【发布时间】:2013-03-09 07:36:16
【问题描述】:
Administrator@SANZVAIO /e/projects/pySan (master)
$ git remote add pySan git@github.com:sanfx/.git
Administrator@SANZVAIO /e/projects/pySan (master)
$ git push -u origin master
The authenticity of host 'github.com (207.97.227.239)' 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)? yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of know
n hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
还有其他方式可以推送到 github 吗?我在 Windows 7 上使用 Git Bash。
【问题讨论】:
-
你上传你的ssh key to github了吗?
-
是的,srikanth,这解决了问题,但现在我得到了这个
$ git push git@github.com:sanfx/pySan.git Enter passphrase for key '/e/Users/Administrator/.ssh/id_rsa': To git@github.com:sanfx/pySan.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'git@github.com:sanfx/pySan.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') hint: See the 'Note about fast-forwards' in 'git push --help' for details. -
只是:你的本地分支在远程分支的“后面”,所以你不能推送,直到你拉(更新)你的本地分支。 Git 是一个非常强大的工具,它实际上可以增强您的开发。请阅读这篇关于 Git 的优秀指南:git-scm.com/book/en
标签: git ssh public-key github-for-windows