sourcetree/githubでの認証エラーの対処方法
- 2021年7月08日
- 技術情報, Web Service
今回はsourcetree/githubの認証エラーの対処方法をシェアします。
エラー内容
githubのリポジトリと連携したsourcetreeからgithubサーバーへプッシュ/プル/フェッチなどの操作をおこなう際に、以下のエラーに遭遇しました。
git -c diff.mnemonicprefix=false -c core.quotepath=false –no-optional-locks fetch origin
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/xxxxxxxxx’: The requested URL returned error: 403
![](/appnews/wp-content/uploads/sites/4/2021/07/a576c34cf58eb54050c5132e969b2e06.png)
電圧不足のため一時的にパスワード認証が使用できないのでパーソナルアクセストークンを変わりに使用してください、ということのようです。
対処方法をいくつか試したところ、以下の方法でOAuth認証を使用したところエラーが改善しましたのでその方法をシェアします。
sourcetree/githubのOAuth認証方法
ブラウザ上でgithubにログインした状態にします。
![](/appnews/wp-content/uploads/sites/4/2021/07/a-1024x602.png)
この状態でsourcetreeのツールメニューからオプション>認証 を開きます。
![](/appnews/wp-content/uploads/sites/4/2021/07/b.png)
上記の画面が表示されますので、右上の「追加」ボタンをクリックします。
![](/appnews/wp-content/uploads/sites/4/2021/07/7.png)
上記の画面が表示されますので「OAuthトークンを再読み込み」ボタンをクリックします。
![](/appnews/wp-content/uploads/sites/4/2021/07/8-1024x750.png)
ブラウザで上記の画面が表示されます。
画面下までスクロールをおこない、下図の「Authorize atlassian」ボタンをクリックします。
![](/appnews/wp-content/uploads/sites/4/2021/07/9-1024x785.png)
sourcetreeの以下の画面に戻り、下図のように「認証に成功」と表示されれば完了です。
![](/appnews/wp-content/uploads/sites/4/2021/07/10.png)
以上のように認証変更をおこなったことによりgithubリポジトリへプッシュ/プル/フェッチなどの操作がおこなえるようになりました。
木曜日担当:nishida
nishida at 2021年07月08日 10:00:48