How can I get a list of remote repositories from gitolite?

1.9k Views Asked by At

For single repo which name I already know I can use this command:

git clone gitolite3@remoteserver:repo.git

But how can I get list of all repositories on remoteserver available for cloning?

2

There are 2 best solutions below

0
zeterain On BEST ANSWER

Try ssh gitolite3@remoteserver. You'll get a list of all repositories available. To be clear, this will not get you a remote shell on the server. It only displays the available repositories.

This works if you have gitolite installed, which I assume you do, given the username.

Keep in mind that this only shows you which repositories your user has access to, as well as whether you have read/write permissions for each repository. Repositories that gitolite3 does not have permission to read or write will not appear in the output with the above command.

0
VonC On

The normal command is ssh git@host info

tells you what version of gitolite and git are on the server, and what repositories you have access to.

That is more reliable than ssh to the server, which a regular user could not do anyway, because their SSH public key is associated to a gitolite "force command": they cannot get an interactive session.