无法将代码推送到github存储库

时间:2012-07-18 08:16:51

标签: git github

我无法将更改推送到github存储库,并收到以下错误消息 -

D:\Research\scribe-java>git push git@github.com:fernandezpablo85/scribe-java.git master
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is -----.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
D:\Research\scribe-java>git push git@github.com:fernandezpablo85/scribe-java.git master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

有人能帮助我理解我在这里做错了什么......?

3 个答案:

答案 0 :(得分:2)

仅从该错误看起来您的私钥无效。您是否已将公钥添加到github?

另外:Github Permission denied

答案 1 :(得分:0)

也许您已经使用超级用户权限创建了密钥,现在您无法使用它,因为您是普通用户。

答案 2 :(得分:0)

首先使用

创建ssh密钥

$ ssh-keygen -t rsa

密钥在〜/ .ssh / id_rsa.pub中创建 复制该密钥并添加到github。可能会起作用