Can not add user with Gitolite (centos)

依然范特西╮ 提交于 2019-12-01 09:41:42

问题


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.



来源:https://stackoverflow.com/questions/25562128/can-not-add-user-with-gitolite-centos

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