Configuring public key of users via gitolite throws error

I have added the public key of a user and pushed to the server.
But while running the gl-setup I have used like /tmp/id_rsa.pub instead of /tmp/rekha.pub.

Now I have altered the file name and then again tried to run the gl-setup.

It shows the message at last like this

rekha.pub maps to user id_rsa, not rekha.
You will not be able to access gitolite with this key.
Look for the 'ssh troubleshooting' link in http://sitaramc.github.com/gitolite/.

How to solve this problem?

  • I can't see my project in gitweb. How do you configure gitweb properly?
  • dealing with long personal branch names in git and gitolite
  • Gitolite clone fails
  • git clone git@myserver:gitolite-admin fails
  • Gitolite on Dreamhost
  • setup gitolite on mounted device - ubuntu
  • Can I write a server hook that warns on files containing Git conflict markers?
  • How to move git repositories from github to local server running gitolite
  • One Solution collect form web for “Configuring public key of users via gitolite throws error”

    First gl-setup is a gitolite V2 or ‘g2’ command.
    The current documentation for installation is for GitoliteV3 (or ‘g3’): an upgrade would be wise (for ease of support)

    Looking at the sources of gitolite, I find sshkeys-lint which will check for gitolite admin user:

    if ($admin) {
        my $fp = fprint("$admin.pub");
        my $fpu = ( $seen_fprints{$fp}{user} || 'no access' );
        # dbg("fpu = $fpu, admin=$admin");
        die "\t\t*** FATAL ***\n" .
            "$admin.pub maps to $fpu, not $admin.\n" .
            "You will not be able to access gitolite with this key.\n" .
            "Look for the 'ssh troubleshooting' link in http://sitaramc.github.com/gitolite/.\n"
        if $fpu ne "user $admin";
    }
    

    You might need to try again gl-setup rekha.pub, as explained by the ssh troubleshooting for g2.
    If that fails, check your ~gitolite-user-account/.ssh/authorized-keys and make sure id_rsa is replaced, if present, by rekha.


    The OP thillaiselvan reports in the comment having a working Gitolite again:

    I have achieved it by:

    • replacing deleting the id_rsa content in the authorized-keys file.
    • Created a fresh pub key for the rekha user.
    • And then freshly pushed it which is a huge work around.

    Now it works fine 🙂

    Git Baby is a git and github fan, let's start git clone.