ブログの投稿ログ

2021年
9月
8月
7月
6月

Githubのパスワード認証が廃止された話

githubからクローンした時下記のようなエラーが出たのでその解決法を書いていきたいと思います。
原因としては8/13日からGithubのパスワード認証が廃止されたことで、個人のアクセストークンが必要となったことでした。

$ git clone https://github.com/username/repository.git
Cloning into 'repository'...
Username for 'https://github.com': username
Password for 'https://username@github.com':
remote: Password authentication is temporarily disabled as part of a brownout. Please use a personal access token instead.
remote: Please see https://github.blog/2020-07-30-token-authentication-requirements-for-api-and-git-operations/ for more information.
fatal: unable to access 'https://github.com/username/repository.git/': The requested URL returned error: 403

1

githubでSettings/Developer settingsを開く
token設定ページ

2

hoge

Select scopes内の権限を編集する。

Generate TokenをクリックしてTokenをコピーする。

3

hoge

キーチェーンを開いてgithub.comのパスワードのフォームに上書きする。

4

再度git cloneして接続を確かめる。