Git 克隆:权限被拒绝(公钥)。致命:无法从远程存储库读取
Git Clone : Permission denied (publickey). fatal: Could not read from remote repository
我正在使用 bitbucket,我正在尝试克隆一个存储库:sudo git clone git@bitbucket.org:KassaK/mbf.git
我收到此错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我到处寻找解决方案,但没有什么好办法。
我遵循了 https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html 的说明(到 Step),但我总是遇到这个错误。
我尝试删除并重新安装 git 但还是一样。
对我有什么想法吗?谢谢 !
对于public密钥认证系统,它涉及主机名,用户名,密钥文件名等,如果你运行使用sudo,用户名将是 root, 和你运行 ssh-keygen 生成密钥对的方式不同。
所以认证失败。
我正在使用 bitbucket,我正在尝试克隆一个存储库:sudo git clone git@bitbucket.org:KassaK/mbf.git
我收到此错误:
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我到处寻找解决方案,但没有什么好办法。
我遵循了 https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html 的说明(到 Step),但我总是遇到这个错误。
我尝试删除并重新安装 git 但还是一样。
对我有什么想法吗?谢谢 !
对于public密钥认证系统,它涉及主机名,用户名,密钥文件名等,如果你运行使用sudo,用户名将是 root, 和你运行 ssh-keygen 生成密钥对的方式不同。 所以认证失败。