Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl on docs.github.com results in HTTP 403 with "The request is blocked" #17358

Closed
1 task done
mikouaj opened this issue Apr 25, 2022 · 9 comments
Closed
1 task done
Labels
engineering Will involve Docs Engineering

Comments

@mikouaj
Copy link

mikouaj commented Apr 25, 2022

Code of Conduct

What article on docs.github.com is affected?

I assume that all pages from docs.github.com are affected, tested on:

Check Gist with verbose output of curl.

What changes are you suggesting?

The content on docs.github.com should be widely accessible.
Many CONTRIBUTING.md files contain link to the below docs.github.com page:

We use Markdown links checker that follows the links in markdown files to verify them. It fails on 'docs.github.com' links due to HTTP 403 response code.

Additional information

No response

@mikouaj mikouaj added the content This issue or pull request belongs to the Docs Content team label Apr 25, 2022
@welcome
Copy link

welcome bot commented Apr 25, 2022

Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Apr 25, 2022
@ramyaparimi ramyaparimi added waiting for review Issue/PR is waiting for a writer's review pull requests Content related to pull requests and removed triage Do not begin working on this issue until triaged by the team labels Apr 26, 2022
@ramyaparimi
Copy link
Contributor

@mikouaj
Thanks so much for opening an issue! I'll triage this for the team to review 👀

gonzalocasas added a commit to compas-teaching/COMPAS-II-FS2022 that referenced this issue Apr 26, 2022
@nikitar
Copy link

nikitar commented Apr 27, 2022

Same issue here. It seems to depend on your ip (I get different results on & off vpn)

@felicitymay felicitymay added triage Do not begin working on this issue until triaged by the team and removed waiting for review Issue/PR is waiting for a writer's review labels Apr 27, 2022
@ramyaparimi ramyaparimi added engineering Will involve Docs Engineering and removed content This issue or pull request belongs to the Docs Content team triage Do not begin working on this issue until triaged by the team pull requests Content related to pull requests labels Apr 27, 2022
@ramyaparimi ramyaparimi added this to Engineering review needed in Docs open source board Apr 27, 2022
@janiceilene
Copy link
Contributor

@mikouaj Thanks so much for opening an issue to let us know what you're seeing and I'm sorry you're seeing issues with the docs site! We're tracking this internally, so I'm going to close this now 💛

Docs open source board automation moved this from Engineering review needed to Done Apr 27, 2022
@praveenkumar
Copy link

praveenkumar commented Apr 28, 2022

Not sure why this issue is closed until it is fixed (even tracked internally), I am also experiencing the same for docs.github.com

$ curl -I https://docs.github.com
HTTP/2 403 
x-azure-ref: 0HTJqYgAAAAD1pEFVgbNxSa5wCE6sfvbYRFhCMzBFREdFMDIwNwA1OTZkNzhhMi1jYTVmLTQ3OWQtYmNkYy0wODM1ODMzMTc0YjI=
accept-ranges: bytes
date: Thu, 28 Apr 2022 06:20:13 GMT
via: 1.1 varnish
x-served-by: cache-maa10222-MAA
x-cache: MISS
x-cache-hits: 0
x-timer: S1651126813.090800,VS0,VE198
strict-transport-security: max-age=31557600

but for github.com it is working

$ curl -I https://github.com
HTTP/2 200 
server: GitHub.com
date: Thu, 28 Apr 2022 06:20:05 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Accept-Language, Accept-Encoding, Accept, X-Requested-With
permissions-policy: interest-cohort=()
content-language: en-US
etag: W/"905ccee40f4cb9273cc299723eb39e06"
cache-control: max-age=0, private, must-revalidate

praveenkumar added a commit to praveenkumar/crc that referenced this issue Apr 28, 2022
This pr try to solve following issue by adding docs.github.com
to ignore list.

```
FILE: ./source/topics/proc_troubleshooting-unknown-issues.adoc
[✓] https://github.com/code-ready/crc/issues
[✓] https://github.com/code-ready/crc/issues/new
[✖] https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files

3 links checked.

ERROR: 1 dead links found!
[✖] https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/attaching-files → Status: 403
make: *** [Makefile:138: docs_check_links] Error 123
```

```
$ curl -I https://docs.github.com
HTTP/2 403
x-azure-ref: 0fzhqYgAAAAA4TNP/TuUcR6h8UmZoI8OxRFhCMzBFREdFMDIxNQA1OTZkNzhhMi1jYTVmLTQ3OWQtYmNkYy0wODM1ODMzMTc0YjI=
accept-ranges: bytes
date: Thu, 28 Apr 2022 06:47:27 GMT
via: 1.1 varnish
x-served-by: cache-maa10249-MAA
x-cache: MISS
x-cache-hits: 0
x-timer: S1651128448.577384,VS0,VE51
strict-transport-security: max-age=31557600
```

- github/docs#17358
@cfergeau
Copy link

curl --compressed -I https://docs.github.com works though (this adds a accept-encoding: deflate, gzip, br header to the request)

cfergeau added a commit to cfergeau/crc that referenced this issue Apr 29, 2022
For some reason, help.github.com will only serve compressed content, and
will reply with a 403 error without any "Accept-encoding" headers.
This is tracked in github/docs#17358

For this fix to work, quay.io/crcont/docs-builder:latest must be rebuilt
and pushed to quay.
This can be rebuilt and tested locally with:

$ (cd images/docs-builder && podman build -t quay.io/crcont/docs-builder:latest .)
$ make docs_check_links
cfergeau added a commit to cfergeau/crc that referenced this issue Apr 29, 2022
For some reason, help.github.com will only serve compressed content, and
will reply with a 403 error without any "Accept-encoding" headers.
This causes 'make docs_check_links' to report help.github.com links as being
dead.
This is tracked in github/docs#17358

For this fix to work, quay.io/crcont/docs-builder:latest must be rebuilt
and pushed to quay.
This can be rebuilt and tested locally with:

$ (cd images/docs-builder && podman build -t quay.io/crcont/docs-builder:latest .)
$ make docs_check_links
praveenkumar pushed a commit to crc-org/crc that referenced this issue Apr 29, 2022
For some reason, help.github.com will only serve compressed content, and
will reply with a 403 error without any "Accept-encoding" headers.
This causes 'make docs_check_links' to report help.github.com links as being
dead.
This is tracked in github/docs#17358

For this fix to work, quay.io/crcont/docs-builder:latest must be rebuilt
and pushed to quay.
This can be rebuilt and tested locally with:

$ (cd images/docs-builder && podman build -t quay.io/crcont/docs-builder:latest .)
$ make docs_check_links
@larshp
Copy link

larshp commented May 3, 2022

same issue, when checking links with https://github.com/gaurav-nelson/asciidoc-link-check

csainty added a commit to csainty/atlantis that referenced this issue May 31, 2022
There seems to be bot protection on docs.github.com which can be bypassed by requesting compressed content - github/docs#17358 (comment)
jamengual pushed a commit to runatlantis/atlantis that referenced this issue Jun 4, 2022
* Replace golang-ci install path

Noticed builds failing to download this script. Docs are updated with a new install path direct from GitHub - https://golangci-lint.run/usage/install/#other-ci

* Workaround bot protection on docs.github.com

There seems to be bot protection on docs.github.com which can be bypassed by requesting compressed content - github/docs#17358 (comment)
gwarf added a commit to EGI-Federation/SVG-advisories that referenced this issue Jun 22, 2022
alrra added a commit to alrra/dotfiles that referenced this issue Jul 1, 2022
Without the "Accept-Encoding" HTTP header GitHub blocks the requests
made to "help.github.com".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also: github/docs#17358
alrra added a commit to alrra/dotfiles that referenced this issue Jul 1, 2022
Without the "Accept-Encoding" HTTP header GitHub blocks the requests
made to "help.github.com".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also:

* github/docs#17358
* tcort/markdown-link-check#201
alrra added a commit to alrra/browser-logos that referenced this issue Jul 2, 2022
Without the "Accept-Encoding" HTTP header GitHub blocks the requests
made to "help.github.com".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also:

* github/docs#17358
* tcort/markdown-link-check#201
marcwrobel added a commit to marcwrobel/checklinks that referenced this issue Aug 1, 2022
This prevents 403 errors on help.github.com (github/docs#17358).
shankari added a commit to MobilityNet/mobilitynet-analysis-scripts that referenced this issue Nov 27, 2022
By passing in the correct config file for the link checker code
github/docs#17358
@sdruskat
Copy link

@janiceilene and colleagues, were you able to find the cause of this? I'm getting the same issue using https://github.com/gaurav-nelson/github-action-markdown-link-check (gaurav-nelson/github-action-markdown-link-check#143), but am not convinced that this isn't an issue with the link checker action. Would be good to know of any leads. Thanks!

@riccardoporreca
Copy link

riccardoporreca commented Dec 13, 2022

@sdruskat, this seems known for tcort/markdown-link-check, which /gaurav-nelson/github-action-markdown-link-check relies on: See issue tcort/markdown-link-check#201 linked above, which is in turns already referencing a different issue gaurav-nelson/github-action-markdown-link-check#136. It seems solutions/workarounds should be possible

krrrr38 pushed a commit to krrrr38/atlantis that referenced this issue Dec 16, 2022
* Replace golang-ci install path

Noticed builds failing to download this script. Docs are updated with a new install path direct from GitHub - https://golangci-lint.run/usage/install/#other-ci

* Workaround bot protection on docs.github.com

There seems to be bot protection on docs.github.com which can be bypassed by requesting compressed content - github/docs#17358 (comment)
wingy3181 added a commit to wingy3181/dotfiles that referenced this issue Nov 27, 2023
…ory and rename it to scripts

✅ Send "Accept-Encoding" HTTP header when checking "help.github.com"
Without the "Accept-Encoding" HTTP header GitHub blocks the requests
made to "help.github.com".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also:

* github/docs#17358
* tcort/markdown-link-check#201

See alrra@a3433f8
See alrra@4dc75ad
See alrra@4ab15e9
wingy3181 added a commit to wingy3181/dotfiles that referenced this issue Nov 27, 2023
…ory and rename it to scripts

✅ Send "Accept-Encoding" HTTP header when checking "help.github.com"
Without the "Accept-Encoding" HTTP header GitHub blocks the requests
made to "help.github.com".

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

See also:

* github/docs#17358
* tcort/markdown-link-check#201

See alrra@a3433f8
See alrra@4dc75ad
See alrra@4ab15e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engineering Will involve Docs Engineering
Development

No branches or pull requests

10 participants