私たちのチームはgitlabにgitリポジトリを持っています。私はそこに口座を持っている。私は1台のコンピュータにsshキーを作成しました。今、私はそのレポを別のマシンにクローンしたいと思っています。私のアカウントでは、 "SSHキー"セクションで自分の公開鍵を見ることができます。また、 "アカウント"セクションで自分のプライベートトークンを見ることができます。最初に私はsmartgitと、既存のキーを使用していた、それが動作did`tその後、私は自分のアカウントへの新しい公開鍵を追加し、新しいキーを作成し、このようにgit bashのからクローンを作成してみました:GitLabでgitリポジトリをクローンする方法
git clone [email protected]:bla/bla.git
しかし、それが与えます私
Cloning into 'bla'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
私も id_rsa.pubファイルに直接私のGitLabアカウントから公開鍵をコピーしようとしました。
どうすればそのリポジトリをクローンにすることができますか? ssh -vvv [email protected]
debug3: send packet: type 5
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /c/Users/Arthur/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug1: Trying private key: /c/Users/Arthur/.ssh/id_dsa
debug3: no such identity: /c/Users/Arthur/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /c/Users/Arthur/.ssh/id_ecdsa
debug3: no such identity: /c/Users/Arthur/.ssh/id_ecdsa: No such file or directo ry
debug1: Trying private key: /c/Users/Arthur/.ssh/id_ed25519
debug3: no such identity: /c/Users/Arthur/.ssh/id_ed25519: No such file or direc tory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
* "自分のGitLabアカウントの公開鍵をid_rsa.pubファイルに直接コピーしようとしました。それは非常に悪い考えです。それ以外の方法でやり直してください。あなたのコンピュータには秘密鍵が必要です。 'ssh -vvv git @ gitl.website.com'からログを投稿する – Jakuje
SSHエージェントに秘密鍵を追加していない可能性があります。 – Luke
ログで投稿を編集しました。どうすれば手動で追加できますか? –