2013-03-09 94 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

相關問題