Git Push origin master 返回错误无法生成...为什么?
我是第一次尝试使用 GitHub,但在尝试正确进行身份验证后遇到了许多问题,我成功地使用 [email protected] 并创建了一个存储库,但是当我尝试“git Push origin master”时,出现以下错误:
$ 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"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这让我想起了问题 313,其中
GIT_SSH
环境变量的路径中包含空格。除此之外,您是否按照 GitHub 帮助页面 操作并检查您的 ssh 连接是否正确工作了吗?
That reminds me of issue 313, where
GIT_SSH
environment variable contains spaces in its path.Other than that, did you followed the GitHub Help page and checking if your ssh connection worked?
我不确定这是否只是我自己的愚蠢,但我已经解决了这个问题......
这就是我所做的(来自同事的建议):
我试图将本地存储库中的更改推送到 github 上的空存储库...
我应该做的是克隆空存储库,将文件本地添加到我的克隆中存储库,添加文件,提交添加,然后推送到 github 存储库...
我最初的问题可能是由于我对 git 使用的完全天真...
I'm not sure if it was just stupid of myself, but I've solved the problem...
Here's what I did (from advice, from work colleagues):
I was attempting to push changes in a local repo to an empty repo on github...
what i should have done was clone the empty repo, add the files locally to my cloned repo, added the files, commited the adds, and THEN push to the github repo...
My original problems might have been due to my totaly naivety as to gits usage...
我不确定这是否只是 smartgit 问题,但当这种情况发生在该程序中时,它实际上是临时文件夹上的权限问题。 Windows 7 和 8 似乎偶尔会重置临时目录的权限,您需要将它们更改回完全读写权限。
I'm not sure if this is only a smartgit issue, but when this happens in that program its actually a permissions issue on the temp folder. It seems like windows 7 and 8 occasionally reset the permissions on the temp directory and you need to change them back to full read and write perms.
我有同样的问题。
我将远程链接从:更改
为 url-link:
然后它工作正常。
I had same problem.
I changed my remote link from:
to url-link:
then it worked fine.
先拉,再推。似乎有时您的本地存储库会变得“陈旧”。当我一周左右没有推送或拉动任何东西时,我需要拉动(即使没有任何变化,因为我是唯一一个在该仓库上工作的人)。
Do a pull first, before pushing. It seems that sometimes your local repo gets "stale". When I don't push or pull anything for a week or so, I need to pull (even though there are no changes, since I'm the only one working on that repo).
我有同样的问题。我尝试过的一些调试步骤:
ssh -T [email protected]
工作正常GIT_SSH
为空,就像在另一台机器上该命令工作正常一样,sshCommand
并不重要;错误发生在读取之前git remote remove origin && git remote add origin git@
没有解决问题>.git
文件夹我用本地状态推送了所有分支,备份了一些未跟踪的文件,删除了整个存储库目录并再次克隆。从那时起,一切都按其应有的方式工作
I had the same issue. Some debugging steps that I tried:
ssh -T [email protected]
works fineGIT_SSH
is empty, just like on another machine where the command works finesshCommand
doesn't matter at this point; the error occurs before that is readgit remote remove origin && git remote add origin git@<repository>
didn't resolve the issue.git
folderI pushed all my branches with local state, backed up some untracked files, deleted the whole repository directory and cloned again. From then on everything worked as it should ????
My best guess as the what was going on is corruption somewhere in the
.git
folder.