DEV Community

developer-help
developer-help

Posted on

1

Basic auth deprecation on github and its impact

Basic auth deprecation on github and its impact.

Till now Github was supporting basic Authentication for making an API call for git.
But starting nov-20 git stopped supporting basic Authentication as mechanism for authentication.

As per git alternative is to use personal token for authentication for GIT API calls.

Though personal token is there from long time but there is no clear cut details about
what exactly works that is how i scrambled over net to figure out what works.

Below set of details with curl, that works and does not work.

curl -H "Authorization: Bearer " -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/developer-help/Test-Token/contents/pipeline.json

Does not work
curl -H "Authorization: Token " -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/developer-help/Test-Token/contents/pipeline.json

Does not work
curl -H "Authorization: Basic " -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/developer-help/Test-Token/contents/pipeline.json

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay