私は 2 つの GitHub アカウントを持っています。
アカウント1
アカウント2
account2 では、特定のレポのコラボレーターとして追加されています。
account_notmine/repo_xyz
2 番目のアカウント用に新しい ssh キーを作成して追加し、github にも追加しました。
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
Host github-new
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_new
ここで、account2 の個人用リポジトリの 1 つで作業しようとすると、問題なく動作します。しかし、私が共同作業者であるレポを複製しようとすると、うまくいきません。
基本的に、私がやっていることは、このコマンドを実行しようとしていることだけです:
git clone --bare git@github-new:account_notmine/repo_xyz.git
そして、それが私に与えるエラーは次のとおりです。
Cloning into bare repository 'repo_xyz.git'...
Warning: Permanently added 'github.com,xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
私は何を間違っていますか?