开发者

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://user@server.com/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?


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"


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 user@server.com/git/project.git should work.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜