2013-03-09 88 views
-1
[email protected] /e/projects/pySan (master) 
$ git remote add pySan [email protected]:sanfx/.git 

[email protected] /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无法推送到Github,获得“权限被拒绝(publickey)”

+0

可能重复的http://stackoverflow.com/questions/8402281/github-push-error-permission-denied和/或http://stackoverflow.com/questions/5026796/git-repositiory-adding-files – 2013-03-09 07:39:51

+1

你有没有将你的[ssh密钥上传到github](https://help.github.com/articles/generating-ssh-keys)? – 2013-03-09 07:43:10

+0

是srikanth,这解决了这个问题,但现在我得到这个 '$ git push [email protected]:sanfx/pySan.git 输入密钥'/e/Users/Administrator/.ssh/id_rsa' : 到[email protected]:sanfx/pySan.git ! [已拒绝]主 - >主(非快进) 错误:无法将某些参考文献推送到'[email protected]:sanfx/pySan.git' 提示:由于当前分支的提示是 暗示:其远程对应。合并远程更改(例如'git pull') 提示:有关详细信息,请参阅'git push --help'中的'关于快进'的注意事项'。' – 2013-03-09 07:57:18

回答

2
  1. 使用Git bash,那么你回购URL是错误的
  2. 你可能也有一个SSH的问题。

,必须先创建GitHub上的一个空仓库,通过the webinterfaceGitHub API

让我们假设你刚刚创建myrepo,使用URL语法是:

git remote add pySan [email protected]:sanfx/myrepo.git 

如果仍有SSH错误,请检查您的公钥/私钥对,或使用https开始:

git remote set-url pySan https://github.com/sanfx/myrepo.git 
+0

无论如何,我想通了,首先我必须正确设置这个Windows登录SSH密钥,然后我不得不使用这个命令'git push -f origin ',我正在走上gitorious的道路...... – 2013-03-09 08:47:55

相关问题