我按照Gitlab的指示设置了SSH密钥。
一切都完成后,我使用以下命令来测试我的设置:
ssh -T git@gitlab.com
但后来我遇到了一个错误,与有关。
git@gitlab.com: Permission denied (public key).
我也尝试了ssh -Tvvv git@gitlab.com
来查找问题,如下所示。
但是我无法弄清楚如何修复它,有人有想法或者可以分享建议吗?
非常感谢!
OpenSSH_8.1p1, LibreSSL 2.7.3
.......
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: Trying private key: /Users/brandon/.ssh/id_rsa
debug3: no such identity: /Users/brandon/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /Users/brandon/.ssh/id_dsa
debug3: no such identity: /Users/brandon/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /Users/brandon/.ssh/id_ecdsa
debug3: no such identity: /Users/brandon/.ssh/id_ecdsa: No such file or directory
debug1: Offering public key: /Users/brandon/.ssh/id_ed25519 ED25519 SHA256:uOKjKpgEmnKqrFAS05Ccy8+B3Uw0kzSpurUpOgH0l3k
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: /Users/brandon/.ssh/id_xmss
debug3: no such identity: /Users/brandon/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
git@gitlab.com: Permission denied (publickey).
感谢您耐心阅读我的帖子。
/Users/brandon/.ssh/id_ed25519
对Gitlab进行认证。这是您添加到Gitlab帐户的相同SSH公钥吗? - Gino Mempin