gitolite 设置变得致命:'/tmp/Q3pnE4WVbu' 的指纹识别失败 [英] gitolite setup getting FATAL: fingerprinting failed for '/tmp/Q3pnE4WVbu'

查看:17
本文介绍了gitolite 设置变得致命:'/tmp/Q3pnE4WVbu' 的指纹识别失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 CentOS 5.9 服务器上安装 gitolite.我已经创建了 git 用户,然后在 su - git 我设法将我的公钥放入 ~/.ssh/目录中,我已经成功地从 github 克隆了 gitolite repo 并运行了 gitolite/安装-ln.下一步是运行 gitolite 设置.

I am installing gitolite on a CentOS 5.9 server. I have created the git user, then after su - git I have managed to get my public key into the ~/.ssh/ directory, I have successfully cloned the gitolite repo from github and have run gitolite/install -ln. Next step is to run gitolite setup.

git@hostname [~]# gitolite setup -pk $HOME/.ssh/micha.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
FATAL: fingerprinting failed for '/tmp/Q3pnE4WVbu'

Google 搜索和 SO 上的搜索并没有帮助我解决这个 FATAL 错误,我现在遇到了困难.

Google search and a search here on SO have not helped me resolve this FATAL error, and I am now stymied.

我应该在运行设置之前自定义 gitolite.conf 文件吗?我一直按照 http://gitolite.com/gitolite/progit.html 的说明操作对于像我这样的菜鸟来说,它们比普通的 gitolite 文档更容易理解.但是,这些说明没有提及自定义 .conf 文件.

Am I supposed to have customised the gitolite.conf file previous to running the setup? I have been following the instructions from http://gitolite.com/gitolite/progit.html as they are a little easier for noob like me to understand than the normal gitolite documentation. However these instructions make no mention of customising the .conf file.

更新:我已经尝试生成一个新密钥,但仍然失败:

UPDATE: I have tried generating a new key and it still fails:

git@hostname [~]# ssh-keygen -t rsa -C "Gitolite Admin Access (not interactive)" -P "" 
Generating public/private rsa key pair.
Enter file in which to save the key (/home/git/.ssh/id_rsa): /home/git/.ssh/micha
/home/git/.ssh/micha already exists.
Overwrite (y/n)? y
Your identification has been saved in /home/git/.ssh/micha.
Your public key has been saved in /home/git/.ssh/micha.pub.
The key fingerprint is:
33:b6:62:8b:b9:58:07:7a:71:6a:02:a5:ff:7e:c3:3a Gitolite Admin Access (not interactive)
git@hostname [~]# gitolite setup -pk $HOME/.ssh/micha.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
FATAL: fingerprinting failed for '/tmp/pUKqewb66w'

我也尝试将 $HOME 替换为完整路径,以防 su - git 混淆它.我的 ssh 安装有问题吗?不知道会怎样,因为我正在使用 ssh 连接到该服务器.

I have also tried replacing $HOME with the full path, just in case the su - git had confused it. Is there some problem with my ssh install? Not sure how there would be as I am using ssh to connect to this server.

更新:事实证明 gitolite 保留了我之前尝试设置但失败的公钥.然后我删除了所有的 repos、gitolite 源目录、~/bin 中的符号链接和 .gitolite 目录,并再次开始安装过程.我从 github 克隆了 gitolite repo,在删除了我之前尝试使用的所有其他密钥后生成了一个新密钥.然后我运行 gitolite install -ln 最后

UPDATE: It turns out gitolite was retaining the public keys I had tried to set up with previously that had failed. I then removed the all the repos, the gitolite source directory, the symlink in ~/bin and the .gitolite directory and started the install process again. I cloned the gitolite repo from github, generated a new key after deleting all the other keys that I had tried to use before. I then ran gitolite install -ln and finally

git@hostname [~]# gitolite setup -pk $HOME/admin.pub
Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/
Initialized empty Git repository in /home/git/repositories/testing.git/
FATAL: fingerprinting failed for '/tmp/tsIx4cKWHj'

仍然失败.

推荐答案

正如我 之前提到的,这意味着 ssh密钥未正确生成.

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

试试:

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

<小时>

OP mwotton 报告 从任何先前的 ssh 密钥中清除 ~/.ssh 是解决方案.
这是因为 ssh-authkeys.fp_file() 函数被称为 有一个发现:


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` );

因此它可以抓取之前(可能已损坏)已在 ~/.ssh 中的密钥.

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

这篇关于gitolite 设置变得致命:'/tmp/Q3pnE4WVbu' 的指纹识别失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆