Reputation: 43518
I used the following command to clone a git repository
git clone ssh://[email protected]/project.git
I placed the key files id_rsa.pub
and id_rsa
in the folder ~/.ssh/
but I get the following error when trying to clone with a above git
command.
ssh -v [email protected]
OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /home/user/.ssh/config
debug1: Applying options for test.server.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to test.server.com [x.x.x.x] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa.pub type 1
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048
debug1: identity file /home/user/.ssh/id_rsa.pub-cert type -1
ssh_exchange_identification: Connection closed by remote host
Upvotes: 4
Views: 3102
Reputation: 2724
You have to add your local key (found in /home/user/.ssh/id_rsa.pub
) on the server in /home/git/.ssh/authorized_keys
Upvotes: 1