无法推送到Github,无法产生sh:没有这样的文件或目录 [英] Trouble pushing to Github, cannot spawn sh: No such file or directory

查看:1537
本文介绍了无法推送到Github,无法产生sh:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难推到Github ..我有一个我已经克隆的仓库,并且我已经对它进行了修改,希望推回github。

I'm having a difficult time pushing to Github..I have a repository that I had cloned, and I have made changes to it that I'd like to push back to github.

在存储库中,我执行以下操作:

While in the repository, I do the following:

git add *

这似乎工作,因为我得不到任何回应,然后当我这样做:

Which seems to work as I get no response, then when I do:

git commit -m "test"

我得到了回应:

I get the response:

On branch Will_branch
nothing to commit, working directory clean

我期望的是我的问题开始。

which I expect is where my problem starts.

当我这样做时:

When I do:

git push origin master
git push origin my_branch

我得到这个错误:

I get the error:

cannot spawn sh: No such file or directory
cannot spawn git: No such file or directory

我已经经历了很多指导,但无济于事。感谢您的帮助。

I have gone through so many guides to no avail..thanks for any help.

推荐答案

这可能是由于回购中有大量标签。查看此谷歌组条目这个问题另一个谷歌组织条目

This might be happening due to a large number of tags in your repo. Check this google-group entry, this question and another google group entry.

基本上,这是 msysgit 的一个已知问题,谷歌用户建议使用ssh协议作为解决方法:

Basically, this is a known issue with msysgit and users on google group suggest using the ssh protocol instead as workaround:


  1. 卸载Git(这不会卸载您生成的现有存储库或SSH密钥)
  2. 重新安装git at C:\Git

  3. 打开git bash

  4. 运行以下命令: export GIT_SSH = / c / Git / bin / ssh.exe

  1. Uninstall Git (this doesn't uninstall your existing repositories or SSH keys you've generated)
  2. Reinstall git at C:\Git
  3. Open git bash
  4. run this command: export GIT_SSH=/c/Git/bin/ssh.exe

另外,没有提交,请执行 git log 来检查如果提交真的发生了。

Also, the commit response you are getting suggests nothing got committed, do a git log to check if the commit actually happened.

另一个原因,如 msysgit ticket 可能是您的空间存在环境变量。将 msysgit 等的安装移动到 C:而不是 C:\程序文件可以解决它。

Another reason, as mentioned in this msysgit ticket could be the presence of spaces in your Environment variables. Moving the installation of msysgit etc to C: instead of C:\Program Files may solve it.

这篇关于无法推送到Github,无法产生sh:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆