gitolite setup getting FATAL: fingerprinting failed for '/tmp/Q3pnE4WVbu'

依然范特西╮ 提交于 2019-12-01 04:32:46
VonC

As I mentioned before, that means the ssh key hasn't been properly generated.

Try:

ssh-keygen -t rsa -f "${H}/.ssh/micha" -C "Gitolite Admin access (not interactive)" -q -P ""

The OP mwotton reports clearing the ~/.ssh from any prior ssh keys was the solution.
This is because the ssh-authkeys.fp_file() function is called with a find:

chomp( my @pubkeys = `find keydir/ -type f -name "*.pub" | sort` );

So it can grab previous (possibly corrupted) keys that already were in ~/.ssh.

if you are taking the pub key from puttykeygen etc.. it will be in multi line with headers like

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "test@example.com"
startofkeylines
....
endofkey==
---- END SSH2 PUBLIC KEY ----

Remove the --- begin and end lines, and the Comment: line. Make all the key lines in one line. and prefix with ssh-rsa, like this:

ssh-rsa startofkeylines....endofkey==

This is what worked for me.

gitolite is fingerprinting all keys in the .ssh directory - including the authorized_keys file. Remove any unneeded or corrupt keys from the .ssh directory and the authorized_keys file.

I ran into the same problem. Turned out that during copy-paste I included a newline into one of my keys. Took me some time to spot it...

You wrote, "It turns out gitolite was retaining the public keys I had tried to set up with previously that had failed."

I had the same problem. I was getting the error:

FATAL: fingerprinting failed for 'keydir/jsmith.pub'

I deleted the failing key on the client side, and did a git push, but still the same issue. Thus I had to logon to the gitolite server and run the following:

rm ~/.gitolite/keydir/jsmith.pub
gitolite setup

This fixed the problem. This works because per the gitolite documentation, "The pubkey files from this push are checked-out into ~/.gitolite/keydir". Well if there is some FATAL error that happens, then the pub keys won't be put in their proper place. So it's possible you could have even formatted your ssh keys properly, and it still won't get written.

I have tried all the key regeneration, gitolite reinstalation, clearing all key files, etc, all without success, untill I started looking at Git history for gitolite.

The problem was that master branch on the github & google.code repos was broken. I checked out last stable version v3.6.4 at the finger print problem dissapeared. I think I can spot one recent commit that nreaks this.

For me, I got it working by not running the gitolite command as the root user. I created a git user account (and found out that it needs to be an account that can be logged into ... that is, no /bin/false in /etc/passwd).

I upgraded gitolite from v2 to v3, runs install and setup the admin key

then force push the config repository, all issues are now fixed.

The issue I encountered was that openssh, in or around version v6.8 changed the default cipher for a fingerprint (ssh-keygen -lf path-to-key) so one must now explicitly pass the cipher type (-E md5) to get the legacy behavior. Reviewing the CHANGES file reveals that v3.6.5 of gitolite will 'handle new style ssh fingerprinting correctly (thanks to Robin Johnson)'. An upgrade of gitolite resolved the issue for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!