Netbeans and Git



我是git/versioning的新手

我用netbeans创建一个git存储库,提交项目,当我尝试"上传"(?)它(使用命令行):

git remote add origin git@github:my_username/my_project_name.git
git push -u origin master

我得到这个错误:

C:UsersАлексей РезниковMy ProjectsnetbeansCourseProject2011>git push -u origin master
Could not create directory '/c/Users/200253245252341245251 220245247255250252256242/.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/200253245252341245251 220245247255250252256242/.ssh/known_hosts).
Connection closed by 207.97.227.239
fatal: The remote end hung up unexpectedly

也许你能告诉我,怎么做才正确?谢谢你

windows 7, netbenas 7.0.1, git 1.7.6

看起来您的ssh客户端可能会被主目录名称中的西里尔字符混淆:

Failed to add the host to the list of known hosts (/c/Users/200253245252341245251 220245247255250252256242/.ssh/known_hosts).

您的ssh客户端将尝试向$HOME/.ssh/known_hosts文件写入一个条目,并且上面的错误报告了这样做的错误(不幸的是,它没有说明错误是什么)。对于诊断,尝试将HOME更改为指向其他没有西里尔字符的地方,看看会发生什么:

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

如果这有效,那么它可能与您的用户名有关。如果同样失败,那么问题可能出在其他地方。

相关内容

  • 没有找到相关文章