Reputation: 1331
I'm working deploying rails applications.
I setup Gitosis on my server. Git user is up and I'm already have 'deploy' user on the server! I was 'git clone' to my local machine from the deploy user on the server. After setting up Gitosis, I'm also able to 'git clone' from the server(git user).
What I want is to 'git clone' from 'git clone' inside the server from 'git' user to 'deploy' user!
and here the problem in a picture.
I'm already know that this issue is in ssh permission etc. because when I try to 'git clone' on deploy user I got
Initialized empty Git repository in /home/deploy/some_folder/.git/
The authenticity of host '[178.xx.xx.xx]:30000 ([178.xx.xx.xx]:30000)' can't be established.
RSA key fingerprint is dc:f3:53:35:xx:xx:xx:f7:62:4c:e3:68:7e:70:46:cb.
Are you sure you want to continue connecting (yes/no)? ( MY ANSWER yes )
Failed to add the host to the list of known hosts (/home/deploy/.ssh/known_hosts).
[email protected]'s password:
Please let me know what I have to do to figure out this issue!
Thanks in advance!
Upvotes: 1
Views: 663
Reputation: 13927
This is probably not a git problem, but an ssh issue. You should be able to replicate the same problem by trying to ssh to the git server (which is localhost). More than likely, the folder ~/.ssh (or ~/.ssh/known_hosts) permissions are incorrect (the disk may be full, or there may be some file system corruption as well, but those are highly unlikely).
If you don't have any important data in there, you can try removing ~/.ssh, and letting ssh rebuild it on your next ssh (or git) attempt to localhost.
Having said that, I remember now that gitosis uses certificates for user authentication. Your .ssh should have an id_rsa and id_rsa.pub. Make sure you save them if they are kept in the local host.
Also make sure you've registered the deploy user's certificate to gitosis, and allowed access to the repository in gitosis.conf. The ssh stage asking for password means that your private key is not being used for authentication for some reason.
Upvotes: 2