【问题标题】:git clone fail info:permission denied(publickey)git clone 失败信息:权限被拒绝(公钥)
【发布时间】:2016-05-13 06:12:54
【问题描述】:

命令

git clone git@github.com*********

信息将失败:

Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我在互联网上搜索过很多次。 答案通常是关于公钥错误等。 但是当我尝试命令时

ssh -T git@github.com

它工作..

我的 id_rsa.pub 刚刚添加到 github 上,当我使用上面的命令时,我可以看到我的 ssh 密钥下的标签Last used within the last day

所以我不明白我的 git 出了什么问题。感觉太糟糕了 T^T。我早上只是在解决这个问题并寻找解决方案。

我的系统是 macOS

感谢您的回答。

【问题讨论】:

  • 你见过this SO post吗?有 22 个答案,看起来都很有帮助。
  • 那是私有仓库吗?您可以使用您的公钥登录到另一台服务器吗? (您了解如何设置公钥身份验证吗?)

标签: git github ssh-keys


【解决方案1】:

这个问题让我很困惑,即使我已经尝试了我在互联网上可以找到的所有解决方案,直到我意外重新安装我的电脑的那一天。 有用。 我猜我旧系统中的某些 conf 与 git 有问题。

【讨论】:

  • 我认为会有比重新安装电脑更简单、更快捷的解决方案...
猜你喜欢
  • 2021-11-11
  • 2014-03-18
  • 1970-01-01
  • 2011-12-15
  • 2020-01-04
  • 2013-11-08
  • 2018-08-17
  • 1970-01-01
相关资源
最近更新 更多