Can not add user with Gitolite (centos)

2019-02-19 20:27发布

问题:

I am newby with gitolite. I've install gitolite on a remote server(192.168.1.109)

So I could git-cloning gitolite-admin.git.

git clone ssh://git@192.168.1.109/gitolite-admin.git

wanted to add user and repo using gitolite. following is ordinary add user process.

ssh-keygen -t rsa -C "test" -f test

added the public key in keydir/test.pub

and then, git add / git commit / git push is done well, GitServer echo msg for git push is:

Total 5 (delta 0), reused 0 (delta 0)
remote: keydir/test.pub: Permission denied
remote: FATAL: fingerprinting failed for 'keydir/test.pub'
To ssh://git@192.168.1.109/gitolite-admin.git
5b8c75d..8c12dac  master -> master

My remote server is CentOS.

remote: keydir/test.pub: Permission denied
remote: FATAL: fingerprinting failed for 'keydir/test.pub'

How would you avoid that error message?

回答1:

If you have generated a test.pub key, you should use a test user in your gitolite.conf.

Try again, as I mention in:

  • "gitolite setup getting FATAL: fingerprinting failed for '/tmp/Q3pnE4WVbu'"
  • "Gitolite - remote: FATAL: fingerprinting failed for 'keydir/'"

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

As illustrated in this blog post:

Digging about in the gitolite code reveals this error is thrown when a regex fails to find a valid looking fingerprint after running ssh-keygen -l -f 'path/to/key.pub'. (See man ssh-keygen for details).

To resolve the issue, run that command locally and have it generate a valid fingerprint before you push your configuration changes to the gitolite server. I found my issue was that I had failed to include the 'ssh-rsa ' prefix to the key.



标签: git gitolite