从第二台机器提交到Git仓库 [Github]

3

我是git的新手。几天前我设置了我的git仓库并开始使用它。(我使用Github) 现在我想要从我的另一台电脑提交代码,所以我安装了git,并尝试使用git clone git@addres.to.my.repo.git进行克隆,但是出现了

The authenticity of host 'github.com (207.97.___.___)' can't be established.
RSA key fingerprint is 16:27...
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'github.com,207.97.___.___' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

我需要证书或其他东西吗?如果需要,我该怎么做呢?

提前感谢您的帮助。

更新: 抱歉,我忘了说我在 Mac OS X 上。


如果您告诉我们您使用的操作系统,那将会非常有帮助! - johnsyweb
这个问题已经有答案了,但我发现这个问题也很有用:https://dev59.com/ok7Sa4cB1Zd3GeqP69AB - nacho4d
2个回答

2
您需要提供您的SSH客户端(在第二台机器上)与此处输入的公钥匹配的私钥:

https://github.com/account#ssh_bucket

如果您在OS X(或Linux或类似系统)上使用OpenSSH,则可能是${HOME}/.ssh/id_rsa,可以直接从第一台机器复制到第二台机器。

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接