Gitolite does not update authorized_keys file

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

I successfully installed Gitolite and had access to the gitolite-admin repository, configured and placed the new keys. When I commit ted and push ed, everything was fine until I noticed that again I could not access the new repositories or gitolite-admin repositories ...

Then I entered my server through ssh and noticed that gitolite deleted all public keys in authorized_keys , except for my default SSH key configured with SSH.

I checked if the hooks propagate and everything looks great - Gitolite created new repositories and compiled a new gitolite.conf

I don’t know what I missed - something is wrong, but I don’t know what it is.

The last thing I saw was that the ~/.gitolite/src/sshkeys-lint file manages authorized_keys files, but I don't understand the script language very well.

+6
source share
1 answer

When you commit, do you get the following error in the console (on the machine, where are you from)?

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

If so, the problem is find.exe.

On Windows, there is a find.exe file in the \ windows \ system32 folder, and cygwin has its own find.exe file. Typically, \ windows \ system32 enters the environment variable 'path'.

Gitolite uses 'find' in its scripts, but unfortunately find.exe from windows, not from cywin, is executed.

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

After that, you will not encounter a problem again when the authorized_keys file is cleared upon commit.

I have gitolite running on a Windows Server 2008 machine with mirroring. (I configured this as a subordinate, and master is the centOs machine.) More information, Since you installed sshd as a Windows service, the cygwin path will be provided with less options than the Windows pass.

+6
source

Source: https://habr.com/ru/post/897894/


All Articles