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 git@59.80.70.68: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.
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
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.
I ran into this problem on Windows 7 using Git Bash on top of Cygwin.
The issue was that my SSH client was not the one installed with Git (I also have Tortoise SVN installed which installs its own SSH client).
You can check the value of $GIT_SSH this should be set to the SSH binary installed with git not some other client (like one that comes with Tortoise SVN/Git).
To do so in Cygwin run echo $GIT_SSH
it should be something like "C:\Program Files\Git\bin\ssh.exe"
if it is not you can update its value in your environment variables
(On Windows 7: Start->Right click on 'Computer' -> Properties -> Advanced system settings -> Environment Variables -> Select 'GIT_SSH' -> click 'Edit...' -> Enter the path to ssh.exe for 'Variable value:'.
The "Setup gitosis management repository" in this post may help:
Setting Up Git Server Using Gitosis
i had this problem because i wanted to store .ssh/id_dsa somewhere else, git seems by default to look for the identity on your folder, but i haaven't found a way to specify a path to search for it