Search code examples
sudogitoliterm

enable 'sudo' to rm wild repo (gitolite)


I need to delete wild repo, but don't have enough privileges to do so, even though I am gitolite admin user, and I have no public key of the CREATOR of that repo (as it's on another physical machine, which I currently have no access to). I read something about 'sudo' command, but I don't know where I am supposed to enable it, and how. I suppose it should be in .gitolite.rc file?!

Does anyone know how to do this? Thanks.


Solution

  • Regarding the sudo command (introduced in gitolite v3.04, 2012-06-27):

    sudo -- allows an admin (i.e., someone who has push rights to the 'gitolite-admin' repo) to run any remote command as some other user.

    This is useful, for example, when a user claims he is unable to access a repo, and you need to check the 'info' output for him, etc. However, it does not work the other way, sorry!

    The source includes that way this command is activated, using gitolite query-rc command:

    # figure out if the command is allowed from a remote user
    gitolite query-rc -q COMMANDS $cmd || die "Command '$cmd' not allowed"
    gitolite $cmd "$@"
    

    You need to add 'sudo' to the list of enabled command in your .gitolite.rc on the gitolite server.

    ENABLE => [
    
        # COMMANDS
    
            # These are the commands enabled by default
            'help',
            'desc',
            'info',
            'perms',
            'writable',
    
            # Uncomment or add new commands here.
            'sudo',