password problem with git clone gitosis@host:gitosis-admin.git
Asked Answered
R

5

10

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.

Rugged answered 17/6, 2009 at 9:4 Comment(3)
The user names you're showing don't match up.Ganister
I got the same issue. I got from log /var/log/secure: Authentication refused: bad ownership or modes for directory /home/git/.ssh then I run command chmod 755 /home/git/.ssh everythin works fine now.Corbicula
chmod 755 /home/git/.ssh works well. Thanks for sharing the info.Swatter
G
9

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
Ganister answered 1/9, 2009 at 2:40 Comment(0)
A
3

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.

Achromatin answered 19/1, 2010 at 16:32 Comment(1)
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 :)Anorak
D
1

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:'.

Derain answered 14/4, 2011 at 18:9 Comment(0)
P
0

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

Setting Up Git Server Using Gitosis

Palmation answered 22/5, 2010 at 7:16 Comment(0)
C
0

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

Claiborne answered 21/5, 2011 at 23:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.