2011-09-20 67 views
0

我非常新的git /版本Netbeans和Git的

創建與NetBeans一個Git倉庫,提交的項目,當我嘗試「上傳」它(使用命令行)(?):

git remote add origin [email protected]:my_username/my_project_name.git 
git push -u origin master 

我得到這個錯誤:

C:\Users\Алексей Резников\My Projects\netbeans\CourseProject2011>git push -u origin master 
Could not create directory '/c/Users/\200\253\245\252\341\245\251 \220\245\247\255\250\252\256\242/.ssh'. 
The authenticity of host 'github.com (207.97.227.239)' can't be established. 
RSA key fingerprint is to:p0:se:cr:et:0f:in:ge:rp:ri:nt:0k:ey:00:00:00. 
Are you sure you want to continue connecting (yes/no)? yes 
Failed to add the host to the list of known hosts (/c/Users/\200\253\245\252\341\245\251 \220\245\247\255\250\252\256\242/.ssh/known_hosts). 
Connection closed by 207.97.227.239 
fatal: The remote end hung up unexpectedly 

也許你能告訴我,怎麼做是正確的?謝謝

Windows 7中,netbenas 7.0.1,1.7.6的Git

+0

你是否已經通過'git init'和設置步驟(或者NetBeans是否爲你做了這些)? http://help.github.com/create-a-repo/我傾向於依賴github.com文檔,並且在命令行上手工完成所有工作。你並不需要NetBeans來爲你管理它,如果這是你的第一個存儲庫,那麼不要手動學習它會非常有益。 – jefflunt

+0

是的,我自己經歷了'git init'。剛剛完成所有步驟 - 同樣的問題:( – yzk

+0

我也困惑。 如何上傳我目前的Netbeans項目到GitHub回購?:( – gumuruh

回答

4

看起來像 SSH客戶端可能會被西里爾字符在你的home目錄名稱相混淆:

Failed to add the host to the list of known hosts (/c/Users/\200\253\245\252\341\245\251 \220\245\247\255\250\252\256\242/.ssh/known_hosts). 

您的ssh客戶端會嘗試寫入$HOME/.ssh/known_hosts文件的條目,並且上述錯誤會報告執行該錯誤的錯誤(不幸的是,它並未說明錯誤是什麼)。對於診斷,嘗試改變HOME到別處點而不西裏爾字母,看看會發生什麼:

mkdir /c/test_home 
export HOME=/c/test_home 
git push -u origin master 

如果這樣的作品,那麼它可能關係到你的用戶名。如果這也失敗了,那麼問題可能在其他地方。