Denis Khvorostin
Denis Khvorostin

Reputation: 857

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

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?

Upvotes: 3

Views: 2284

Answers (2)

zeterain
zeterain

Reputation: 1140

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.

Upvotes: 3

VonC
VonC

Reputation: 1323573

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.

Upvotes: 1

Related Questions