问题
Is it possible to browse all the remote repos available on a given server?
I've seen this:
Git - Browse remote repository
which is about browsing branches in a remote repo. However, I'm assuming this is more of an ssh scripting solution as you need to be able to ssh to the machine and list all the git repos in a certain directory.
回答1:
No, git alone would not offer that kind of feature.
If you have an intermediate layer between the listener (ssh) and your repo, like gitolite, then you can call special gitolite commands in order to get all the repos available (that you are authorized to see).
For instance, the info command
ssh git@host info -h
for help: tells you what version of gitolite and git are on the server, and what repositories you have access to.
To browse their content, you would need an Apache or a CGit server.
来源:https://stackoverflow.com/questions/26062467/git-browse-remote-repos