Discuss / Git / 连接远程库发现错误,请大牛说明下原因

连接远程库发现错误,请大牛说明下原因

Kelvin-醉

#1 Created at ... [Delete] [Delete and Lock User]
$ git push -u origin master
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)?

Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of know
n hosts.
To git@github.com:kelvin-ma/testGit.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'git@github.com:kelvin-ma/testGit.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

The_Fancy

#2 Created at ... [Delete] [Delete and Lock User]

错误的提示信息已经很清楚了。 这个原因是因为你的远程仓库跟你的本地仓库不同步,远程仓库已经有更新了。你需要 git pull


  • 1

Reply