Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to get a compact list of all git repositories managed by gitosis.

I'm looking for something similiar to

svn list url_to_repo

I know that I can have a look at gitosis.conf, but that's to wordy.

share|improve this question

2 Answers 2

As far as I know you can't check what repositories you have access to with gitosis, without checking the gitolite.conf file or without access to the gitosis repo dir (either remote or local)

You should use gitolite to fulfill that need.

Gitolite is easy to install and the usage is almost the same as gitosis (single user access, using a repository with a config file and keydir to configure the service, etc), but it allows setting permissions per branch (if you need to), sync with gitweb, and a bunch of other options (a lot of them actually!)

The best part is that you can send the 'info' command to the server using ssh and it will list the repositories you have access to.

e.g: The command

anUser@computer> ssh git@my-git-server info

Will show in the screen something like

hello anUser, the gitolite version here is v1.5.7-4-g270e0b9
the gitolite config gives you the following access:
     R+  W  Repo1
     R   W  Repo2
     R      Repo3
    @R_ @W_ testing
share|improve this answer
up vote 2 down vote accepted

I put the following code into my .bashrc:

function repos
{
   gitosisDir="/cygdrive/c/Users/Ernst/Source/gitosis-admin"
   awk 'BEGIN { OFS = "[] "; ORS = "\n" } 
        /repo/ {print $2}' "$gitosisDir/gitosis.conf" | sed 's/[][]//g'
}

No I can just type repos and get a handy list of all repositories defined in gitosis.conf.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.