开发者

Gitolite not updating authorized_keys file

开发者 https://www.devze.com 2023-04-06 19:13 出处:网络
I have recently installed Gitolite in a Cygwin environment using SSH keys and everything else. I successfully installed Gitolite and had access to the gitolite-admin repository, configured and put th

I have recently installed Gitolite in a Cygwin environment using SSH keys and everything else.

I successfully installed Gitolite and had access to the gitolite-admin repository, configured and put the new keys. When I committed开发者_StackOverflow and pushed, everything was fine until I noticed that I can't access the new repositories or gitolite-admin repository again ...

I then entered my server via ssh and noticed that gitolite deleted all of the public keys in authorized_keys except for my default SSH key I configured with SSH.

I checked if the hooks are propagating and everything looks fine - Gitolite created the new repositories and compiled the new gitolite.conf

I don't know what i missed - something is wrong but I don't have an idea what it is.

The last I saw is that the file ~/.gitolite/src/sshkeys-lint manage the authorized_keys files but i dont understand the shell script language very well.


When you commit, are you getting the following error in the console(of the machine where from you are commiting)??

remote: FIND: Parameter format not correct 
remote: FIND: Parameter format not correct 

If yes then the problem is the find.exe.

Windows has a find.exe in its \windows\system32 folder and cygwin has its own find.exe. Usually \windows\system32 comes first in the environment variable 'path'.

Gitolite uses 'find' in its scripts, but unfortunately the find.exe from windows rather than from cywin gets executed.

Now to fix the problem, go to the environment variables tab and add bin directory of cygwin before system32.

After this you wont face the issue of "authorized_keys file getting cleared on a commit" again.

I have gitolite working on windows server 2008 machine with mirroring working fine. (I have configured this as a slave and the master is a centOs machine.) More info, As you have installed sshd as a windows service, the cygwin path would be given lesser proirity over windows path will kick in.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号