error: cannot spawn git: No such file or directory

8797 views
Skip to first unread message

Matthew Kanwisher

unread,
May 17, 2011, 3:42:25 PM5/17/11
to msysGit
OMFG if you ever get this error "error: cannot spawn git: No such
file or directory" its a really nasty issue. It took me a day to track
it down, but it boils down to if you have more then 500 tags in a
repository it must blow up some internal command line limits on
cygwin.

TLDR: if you get this error, remove a bunch of your tags

Johannes Schindelin

unread,
May 17, 2011, 5:51:41 PM5/17/11
to Matthew Kanwisher, msysGit
Hi,

On Tue, 17 May 2011, Matthew Kanwisher wrote:

> OMFG if you ever get this error "error: cannot spawn git: No such file
> or directory" its a really nasty issue. It took me a day to track it
> down, but it boils down to if you have more then 500 tags in a
> repository it must blow up some internal command line limits on cygwin.

Good point, but are you sure you're using Git for Windows on Cygwin?

Ciao,
Johannes

Matthew Campbell

unread,
May 17, 2011, 5:53:57 PM5/17/11
to Johannes Schindelin, msysGit
I'm using MSysGit

~Matt

the...@scottnelle.com

unread,
Mar 6, 2014, 11:22:43 PM3/6/14
to msy...@googlegroups.com, matthew....@gmail.com
I recently ran into this issue, and after searching found that people were saying the problem might be with spaces in the path to ssh.exe. This is what I did to fix it:

  1. Uninstall Git (this doesn't uninstall your existing repositories or any SSH keys you've generated. Yay!)
  2. Reinstall git at C:\Git
  3. Open git bash
  4. run this command: export GIT_SSH=/c/Git/bin/ssh.exe
That's all it took for me--I didn't have to delete tags or anything like that.

chidanan...@thoughtfocus.com

unread,
Aug 18, 2015, 7:53:01 AM8/18/15
to Git for Windows, matthew....@gmail.com
I have around 1300 tags with me and when I push branches & master to Bitbucket it is working fine. But when I push TAGS I found the same error.

 "error: cannot spawn git: No such file or directory"

I Don't have any enterprise level bitbucket with me and only for Enterprise level we will get the required space. Since I have the git repository with around 4GB data it is not allowing me. 

I hope if you are pushing the tags to a ENTERPRISE level Github or Bitbucket  it should work. 


Confidentiality Notice: The information contained in this message intended for the addressee is confidential and may constitute inside or non-public information. If you are not the addressee, please promptly delete this message and notify the sender.

Johannes Schindelin

unread,
Aug 18, 2015, 5:03:40 PM8/18/15
to chidanan...@thoughtfocus.com, Git for Windows, matthew....@gmail.com
Hi,

On 2015-08-18 13:51, nanda...@gmail.com wrote:
> I have around 1300 tags with me and when I push branches & master to
> Bitbucket it is working fine. But when I push TAGS I found the same
> error.
>
> "error: cannot spawn git: No such file or directory"

I had to close a ticket that was supposed to address this because it
derailed into some unnecessary emotional discussion instead
(msysgit/msysgit#184).

If you feel up for it, it would be awesome if you could tackle this
issue and work on a patch for Git. In that case, I would gladly give you
some pointers where to start and how to go about it.

Ciao,
Johannes
Reply all
Reply to author
Forward
0 new messages