LoginSignup
6
8

More than 5 years have passed since last update.

SouceTreeでGitHubアカウントでのサインインができなくなった時の対処法

Posted at

現象

SourceTreeでCommitはできたが、Pushがいつまでたっても完了しない状態になった。

GitHubのアカウント認証に失敗しているようだったので、SourceTreeからリモートリポジトリをみてみたら、
GitHubへのサインインを要求されたので、メールアドレスとパスワードを入力したら以下のエラーが返された。

Could not authorize request with the available token. Please re-authenticate.

解決法

①GitHubアカウントのPersonal Setting→ Applications → Authorized OAuth Appsを確認
   →SourceTreeForMac(Macの場合)があることを確認
②SourceTreeの設定アイコン→アカウント→GitHubアカウントの接続し直し。
   →エラーはでず、Sign inできているように見えるが、Pushは失敗する。
③KeyChain AccessのGitHub Credentialsとgithub.com Access Key for [アカウント名]のパスワードを削除 →PC再起動 →SourceTreeでGitHubにサインインし直し。

③でやっと解決。

原因

SourceTreeがGitHub Credentialsのパスワードのアクセス許可を求めるダイアログが複数生成、
一つ常に許可して、複数でてた他のダイアログが閉じるボタンがないため、拒否で閉じたのが原因だと考えられる。

参考リンク

https://community.atlassian.com/t5/Sourcetree-questions/Getting-quot-Could-not-authorize-request-with-the-available/qaq-p/708633
https://community.atlassian.com/t5/Sourcetree-questions/Authentication-issue-accessing-GitHub-repos/qaq-p/397660
https://stackoverflow.com/questions/23039133/github-sourcetree-getting-unauthorized-error

6
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
8