Udayakumar Rayala
Udayakumar Rayala

Reputation: 2284

Unable to Git clone but can do a Git pull/push on already cloned repo

I have a remote Git repository from which i cloned and am able to pull/push to that repository. But recently when i tried to reclone the same repository to a different directory it is not working.

$ git clone -v 'http://[email protected]/git/project.git' project  
Initialized empty Git repository in f:/temp/project/.git/  
Password:  
error: cannot spawn git: No such file or directory

I can still do a git pull and push on the repository which i had already cloned.

I tried goggling for this error but not much of help. Can someone also tell me how i can debug such kind of errors?

Upvotes: 2

Views: 2604

Answers (3)

antoine
antoine

Reputation: 688

This can also happen if you have too many tags on your repository (in our case we had more than a thousand automatically created by Jenkins)

The question : is it neccessary to keep that many tags ? if not delete some of them

Upvotes: 0

Schwern
Schwern

Reputation: 164809

For whatever reason, http isn't working. It could be a problem with your git http server (if it's affecting multiple clients) or your git installation (if all those clients are using the same version of git).

Your existing repository is using ssh, that's what git remote -v told you. So you can continue to use that. git clone [email protected]/git/project.git should work.

Upvotes: 1

grawity_u1686
grawity_u1686

Reputation: 16247

git is unable to start the required subcommand for fetching HTTP repositories. It's likely to be /usr/lib/git-core/git-http-fetch – if it's missing, reinstall Git.


If on Linux, use strace to verify which program git tries to execute.

strace -o /tmp/git.log git clone http://.../

grep "^exec" /tmp/git.log | grep "ENOENT"

Upvotes: 1

Related Questions