2010-06-22 148 views
9

我想第一次使用GitHub,但在尝试获取身份验证权限之后,我设法使用[email protected]进行身份验证并创建了一个回购,但是当我尝试“git push origin主”我得到以下错误:Git push origin master return错误无法产生...为什么?

$ git push origin master 
error: cannot spawn : No such file or directory 
fatal: unable to fork 

我找不到任何理由的错误或故障排除页任何解释,任何人都可以说明为什么这可能是因为我得到这个错误。

$ git remote add origin [email protected]:christopherdebeer/yUML-Diagram.git 

请帮助:

我已经指定

/如下添加远程路径。

此外,这是所有在运行mysysgit(1.7.0.2)和使用git bash的Windows 7机器上。

重:问题313,在GIT_SSH可变的空间,不能是我的问题是:

$GIT_SSH="c:/putty/plink.exe" 

回答

2

我不知道这是否只是愚蠢的我自己,但我已经解决了这个问题... 这是我做了什么(从咨询,从工作中的同事):

我试图推动本地回购更改为Github上的空回购...

我应该做的是克隆空回购,将本地文件添加到我的克隆回购,添加文件,提交添加和然后推到github回购...

$ git clone [email protected]:christopherdebeer/yUML-Diagram.git 
// added files 
$ git add * 
$ git commit -m "first commit locally" 
$ git push origin master 

我原来的问题可能是由于我的天真完全以作为控释片的使用...

+1

奇怪,因为你不应该能够克隆一个空的回购:http:// stackoverflow .com/questions/1298190/gitosis-and-git-clone-problem/1298224#1298224 and http://stackoverflow.com/questions/895819/whats-the-most-straightforward-way-to-clone-an-empty -bare-git-repository/895828#895828。另见http://support.github.com/discussions/repos/150-can not-clone-an-empty-repo – VonC 2010-06-26 19:31:14

+0

我从工作同事那里得到的建议,(他根本没有使用git,但没有svn)......当我提到我的问题时,他建议克隆空回购...尽管这是惯例(如果不是svn),那么至少对他来说是这样。 – Christopher 2010-06-26 19:39:50

+0

这很奇怪,你说它不可能......因为它确实为我工作。 – Christopher 2010-06-26 19:41:45

4

这让我想起了issue 313,其中GIT_SSH环境变量包含在其路径中有空格。

除此之外,你是否遵循GitHub Help page并检查你的SSH连接是否工作?

$ ssh [email protected] 
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 known hosts. 
ERROR: Hi tekkub! You've successfully authenticated, but GitHub does not provide shell access 
Connection to github.com closed. 
+0

是的,我确定检查了我的SSH工作正常。根据GitHub的帮助页面,并得到了消息: “嗨christopherdebeer!你已经成功验证,但GitHub不提供外壳访问” 我会研究“问题313”... – Christopher 2010-06-23 06:23:37

+0

不要它的是最初的没有问题313,我的$ GIT_SSH被设置为“c:/ putty/plink。exe“ – Christopher 2010-06-23 06:29:09

+0

@Christopher:如何不使用'GIT_SSH'和plink.exe?我没有(在我的Windows7 msysgit安装上)并且推得很好。您使用的是什么版本的msysgit? – VonC 2010-06-23 07:22:27

1

我不知道这是否只是一个smartgit的问题,但是当这种情况发生在该程序的实际权限问题在临时文件夹上。看起来像Windows 7和8偶尔会重置临时目录上的权限,您需要将它们更改回完整的读写权限。

0

我有同样的问题。 我改变了我的远程链路:

[email protected]:Prathapnagaraj/trydjango18.git 

到网址链接:

https://github.com/Prathapnagaraj/trydjango18 

然后它工作得很好。

相关问题