简体   繁体   English

在其他Mac上使用SSH密钥

[英]Using SSH Keys on different Mac

I have GIT and my repos setup on a MacBook Air. 我在MacBook Air上安装了GIT和存储库。 I'm trying to clone the repo on my iMac. 我正在尝试在iMac上克隆存储库。 My understanding was that I needed to copy my key over from the /.ssh folder on the MBA to the same folder iMac. 我的理解是,我需要将密钥从MBA的/.ssh文件夹复制到同一文件夹iMac。

However, when I try and clone the repo on the iMac, I get the following error: 但是,当我尝试在iMac上克隆存储库时,出现以下错误:

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

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

I've done a little research already and have verified that... 我已经做了一些研究,并证实了...

At this point, I am all out of ideas and could really use some advice. 在这一点上,我完全没有想法,可以真正使用一些建议。

Suggestions? 建议?

Thanks! 谢谢!

Can't believe I found the solution right after I got done posting this, but for those who are copying keys to new machines, you have to let SSH know the keys are there. 我不敢相信我在完成发布后立即找到了解决方案,但是对于那些将密钥复制到新计算机上的人,您必须让SSH知道密钥在那里。 See this answer for details: 有关详细信息,请参见以下答案:

https://stackoverflow.com/a/12100237/337824 https://stackoverflow.com/a/12100237/337824

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM