4

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
2
  • Can you tell us what you have already tried...a quick duckduckgo :) brought me here: http://edoceo.com/notabene/ssh-exchange-identification Commented Jul 18, 2013 at 14:46
  • why are you using ssh when it works directly: git clone user@server:~/repos/project.git Commented Jul 18, 2013 at 14:51

2 Answers 2

1

You have to add your local key (found in /home/user/.ssh/id_rsa.pub) on the server in /home/git/.ssh/authorized_keys

Sign up to request clarification or add additional context in comments.

Comments

1

You can use ssh-copy-id to send your public key to the server.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.