Reputation: 637
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?
Upvotes: 1
Views: 1350
Reputation: 1326994
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 :)
Upvotes: 2