tschaub/gh-pages

Document GitHub token authentication

tordans opened this issue · 0 comments

As described in #406, Github does not allow to log in via username/password anymore.

Github describes this at https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/#what-you-need-to-do-today

  • For developers, if you are using a password to authenticate Git operations with GitHub.com today, you must begin using > a personal access token over HTTPS (recommended) or SSH key by August 13, 2021, to avoid disruption. If you receive a warning that you are using an outdated third-party integration, you should update your client to the latest version.
  • For integrators, you must authenticate integrations using the web or device authorization flows by August 13, 2021, to avoid disruption. For more information, see Authorizing OAuth Apps and the announcement on the developer blog.

Please confirm

This setup should work for the console deploy via NODE_DEBUG=gh-pages npm run deploy. Once you get it going, the script saves the password (for how long?), so I cannot fully test it now.

  1. Add a access token at https://github.com/settings/tokens / https://github.com/settings/tokens/new
  2. Add scope public_repo if repo is public.
    I guess for private repos (that use a public gh pages page, which is possible), it will likely have to be full repo access, see scope documentation https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps
  3. Username: any_string – please confirm
  4. Password: your_access_token from just now

Does this work for everyone?
If so, an updated readme would be a good first step, IMO.
However, ideally the terminology in the script (username, password) would also change …