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
Top comments (0)