When installing gitolite I get "/tmp/id_rsa.pub doesn't seem to be a valid ssh ssh file"

I am trying to install git and gitolite for our development on a CentOS linux server. Everything has so far gone fine, except that I define the admin user for the githolite with this command:

gitolite setup -pk /tmp/id_rsa.pub FATAL: errors found but logfile could not be created FATAL: /home/git/.gitolite/logs/gitolite-2013-05.log: No such file or directory FATAL: die '/tmp/id_rsa.pub' does not seem to be a valid ssh pubkey file 

It seems like two mistakes; in /home/git/ there are only these files

 .gitolite.rc .bashrc .bash_profile .bash_logout 

And secondly (which seems like a problem) that pub_key is invalid. However, according to the git book, the file looks the same. I created it like this:

  • Installing git on my computer (and not on the server)

  • From git bash:

  ssh-keygen.exe
 (default path)
 (no password)
 (no password)

I copied the generated .pub file to the tmp directory on the server using WinSCP.

What I do? I did not find the answer on google.

PS. If you need more information, please let me know.

+4
source share
2 answers

Make sure that the file / tmp / id _rsa.pub is similar to the one you have on your PC, on one line, without ^M at the end of the line ( \n , not \r\n ).

And after reading the gitolite configuration help page , you should name your public key (on / tmp server) with the administrator name.

The first time you run it, you will need to open the public key file (usually from the administrator's workstation).
If the main name of the administrator of the gitolite is " alice ", this file should be named " alice.pub ". Then, as a hosting user, run:

 gitolite setup -pk alice.pub 
+1
source

I also ran into this problem and looked into the sources of githolite. The code is mostly executed

 ssh-keygen -l -f yourFile.pub 

to verify that the file is a valid ssh-public key ... On my machine (OpenWRT router) ssh-keygen was not installed. Installation with:

 opkg update opkg install openssh-keygen 

fixed the problem for me.

+1
source

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


All Articles