Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法将代码推送到github存储库_Git_Github - Fatal编程技术网

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

无法将代码推送到github存储库,git,github,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

我无法将更改推送到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

有人能帮我理解我做错了什么吗…?

就从那个错误看来,你的私钥是无效的。您是否已将公钥添加到github


另外:

可能您已经创建了具有超级用户权限的密钥,现在您无法使用它,因为您是普通用户。

首先使用

$ssh keygen-t rsa

密钥在~/.ssh/id_rsa.pub处创建 复制该密钥并添加到github。也许它会起作用