tags:

views:

2873

answers:

3

Hi, all

I'm confronted with some problems when trying to configure gitosis on Ubuntu. When i run this command

git clone gitosis@host:gitosis-admin.git

For my local machine i used git clone [email protected]:gitosis-admin.git where 59.80.70.68 is the ip of the server. But I get a password problem. I tried entering password of the server machine, but it fails

Kindly help me.

+5  A: 

Gitosis never works with passwords. It always uses SSH keys. You need to configure the use of whatever public key goes with the private key you gave it when you ran gitosis-init. You would do this by editing ~/.ssh/config to include a stanza like

Host githost # hostname you use on the commandline, in git remotes, etc.
HostName 12.34.56.78 # actually IP address or DNS name to connect to
User gitosis
IdentityFile ~/.ssh/id_rsa # whatever file stores the private key matching the public key you gave gitosis
Novelocrat
+3  A: 

I had a similar problem: I could push from a laptop but not from a linux box.

Looking at the logs on the server, I saw:

Public key b3:f3:... from <SOME IP> blacklisted (see ssh-vulnkey(1))

The problem comes from old versions of openssl generating bad (not random enough) keys on my old linux box. Since I cannot upgrade (embedded development), I generated both the public and private keys on another machine and copied them to the linux box. Once the new public key was in the "keydir" from gitosis-admin, everything worked fine.

Gaspard Bucher
I had this problem with a key that generated from msysgit (Windows GIT) when cloning a git repo I setup on a vps of mine. I just generated a new one on my vps and downloaded it and it worked :)
Zack
A: 

The "Setup gitosis management repository" in this post may help:

http://pkill.info/blog/post/setting-up-git-server-using-gitosis.html

John