2

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?

Liam
  • 27,717
  • 28
  • 128
  • 190
Denis Khvorostin
  • 851
  • 6
  • 12
  • 2
    Git is not designed to deal with anything other that origins exactly as specified. That said, your server's software (GitHub, Azure DevOps, Bitbucket, etc.) may have APIs to do that. – crashmstr Jun 17 '20 at 13:05
  • 2
    This appears to be a gitolite question not a git one. They are not the same thing – Liam Jun 17 '20 at 13:07

2 Answers2

2

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.

zeterain
  • 1,140
  • 1
  • 10
  • 15
1

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250