dpup / git-workflow

Opinionated tools for managing a team based git workflow
Apache License 2.0
91 stars 16 forks source link

GitHub is removing their Authorizations API endpoint #18

Open fc opened 4 years ago

fc commented 4 years ago

Expected Behavior:

No API error email

Actual Behavior:

Received email that says API is endpoint is being removed.

Steps to Reproduce the Problem:

  1. Authenticate with GitHub using the CLI
  2. Receive email that states:

On October 7th, 2020 at 22:32 (UTC) you or an application you used recently accessed the deprecated Authorizations endpoint on the GitHub API with the useragent python-requests/2.24.0.

We will remove the Authorizations API endpoint on November 13, 2020. If you accessed the API via password authentication, then we recommend you use the web flow to authenticate. Please check that your app uses the web flow for authentication https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow

You can learn more about these changes by visiting our developer blog https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/

dpup commented 4 years ago

Thanks for flagging. Don't suppose you've looked into best practices for CLI based auth flows?

dpup commented 4 years ago

We'll need to prompt users to get a personal access token: https://docs.github.com/en/free-pro-team@latest/developers/apps/authorizing-oauth-apps#non-web-application-flow https://docs.github.com/en/free-pro-team@latest/rest/overview/other-authentication-methods#basic-authentication

nicks commented 4 years ago

i like the goreleaser approach to this, which checks either a GITHUB_TOKEN env variable or a ~/.config/goreleaser/github_token config file. https://goreleaser.com/environment/#api-tokens

dpup commented 4 years ago

That's simpler too.