Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git ls-remote returns 128 on any repo

Tags:

git

gitolite

When using git, git ls-remote returns status code 128 while any other commands work flawlessly (push/pull/clone/etc). My repos are being managed with gitolite. I'm getting this error when trying to deploy rails app for the first time. When invoking said command by hand I get standard error like this:

fatal: The remote end hung up unexpectedly

If this was permissions/public key issue, I wouldn't be able to push/pull to/from the repo. Why does single ls-remote command fail?

like image 554
Eimantas Avatar asked Jul 03 '11 17:07

Eimantas


People also ask

What does git LS-Remote do?

git ls-remote is one unique command allowing you to query a remote repo without having to clone/fetch it first. It will list refs/heads and refs/tags of said remote repo. It can also help resolve the actual url used by a remote repo when you have " url.

Does git clone automatically add remote?

If you clone a repository, the command automatically adds that remote repository under the name “origin”.

How do I set up remote origin?

To add a new remote, use the git remote add command on the terminal, in the directory your repository is stored at. The git remote add command takes two arguments: A remote name, for example, origin.

How do I see all repositories in git?

Command #3: git ls-remote This Git command displays not only the names of remote repositories, but their reference information, including Git commit hash.


1 Answers

I figured it out. The problem was in repo's address. I have used git://host/repo address instead of git@host:repo. The latter fixed the issue.

like image 55
Eimantas Avatar answered Sep 23 '22 14:09

Eimantas