Search code examples
gitgitolite

How to check permission for other users in gitolite?


I found a link to documentation which says the ssh info command can be used to look at permissions for other users, but I havent been able to get it to work.

http://gitolite.com/gitolite/g2/info_expand.html

What am I doing wrong?

$ ssh git@ahp0625 info git <user>

Usage:  gitolite info [-lc] [-ld] [-json] [<repo name pattern>]

List all existing repos you can access, as well as repo name patterns you can
create repos from (if any).

    '-lc'       lists creators as an additional field at the end.
    '-ld'       lists description as an additional field at the end.
    '-json'     produce JSON output instead of normal output

The optional pattern is an unanchored regex that will limit the repos searched, in both cases. It might speed up things a little if you have more than a few thousand repos.


Solution

  • From the help message you got, you're using v3, and that too a recent one.

    v3 info does not allow that syntax.
    See src/commands/sudo for a more general way to run any command as some other user.
    (You need to add 'sudo', with a trailing comma, in the list of enabled commands in the rc file -- See Rc.pm).