LoginSignup
3

More than 5 years have passed since last update.

SourceTree のアカウント連携機能が悪さした時の対処法

Last updated at Posted at 2018-04-26

現象

GitHub のとある organization で private なリポジトリを作成した時、 SourceTree 経由で clone ができない。なお、認証は SourceTree に GitHub のアカウントを連携させて行っており、先程の条件以外のリポジトリは clone できる状態である。

原因

SourceTree が何らかの悪さをしている??
なぜ、 organization で private なリポジトリ という特定の条件でしか発生しないのかわからない。

解決策

SourceTree 経由の認証を削除し、標準の認証方法に切り替える。

  1. ssh-add -l ssh-agent で登録された鍵を確認する。
  2. ssh-add -D で鍵を全削除(複数ある場合は鍵を指定すること)
  3. 対象の鍵が削除されていることを確認する
  4. ssh-keygen で鍵を作成する
  5. 鍵を GitHub に登録
> ssh-add -l
4096 SHA256:bz ... 9o  (RSA)

> ssh-add -D
All identities removed.

> ssh-add -l
The agent has no identities.

> cd ~/.ssh
> ssh-keygen
> cat id_rsa.pub

最後に

SourceTree のアカウント連携は使わないほうがいいかもしれません。

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
3