I'm trying to install git and gitolite for our development in a CentOS linux server. Everything so far has ran ok except the step where I define the admin user for gitolite 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 looks like two errors; in /home/git/
there's only these files
.gitolite.rc
.bashrc
.bash_profile
.bash_logout
And second (which seems to be the issue), is that the pub_key is not valid. However, according to the git book the file looks alike. I generated it like this:
Installing git in my pc (not the server)
From the git bash:
ssh-keygen.exe (default path) (no password) (no password)
I copied the generated .pub file to the tmp directory on the server via a program named WinSCP.
What I'm I doing wrong? I don't find the answer in google.
PS. If you need more information, please let me know.
I also ran into this issue and took a look into the sources of gitolite. The code is basically executing
ssh-keygen -l -f yourFile.pub
to verify wheter the file is a valid ssh-public key... On my machine (OpenWRT router) ssh-keygen wasn't installed. Installing it with:
opkg update
opkg install openssh-keygen
fixed the problem for me.
Make sure the /tmp/id_rsa.pub is exactly like the one you have on your PC, in one line, without any ^M
at the end of the line (\n
only, not \r\n
).
And reading the gitolite setup help page, you should name your public key (on the /tmp of the server) with admin's username.
The first time you run it, you need to have a public key file (usually from the admin's workstation) ready.
If the main gitolite admin's username is "alice
", this file should be named "alice.pub
". Then, as the hosting user, run:
gitolite setup -pk alice.pub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With