25

I've created a repository in my local machine and asked a colleague to clone it, but it's saying it can't handle the SSH protocol. In my computer the repository is at /devel/scripts.git, and there's an user called devel with access to that folder. Another guy could clone it normally, using git clone ssh://[email protected]/devel/scripts.git.

We are all using Ubuntu, me and the problematic machine are at 12.04 (I could push from another folder using the same URL as remote) and the other guy is using 13.04.

Finally, the machine that got the issue can access that user via SSH normally.

2
  • "Normally" -- what authentication is used -- password, key, or what? Commented Mar 21, 2014 at 21:33
  • I am getting same error as "fatal: I don't handle protocol 'ssh'" during command "git pull origin master". Any idea anyone??? Commented Jun 14, 2018 at 5:42

4 Answers 4

66

Look at the url in .git/config, in my case there were control characters in the protocol portion. These were not made visible when git generated its error message.

When copy/pasting the error message to another place, the control characters might show up:

enter image description here

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

2 Comments

Based of this idea I retyped the entire git clone command manually instead of copy-pasting it, probably removing some control characters
It's usually enough to simply cancel and retype the "clone ssh" part (as the control character is usually before ssh)
18

I faced the same issue on Windows in Cygwin and was able to get around the error by changing the protocol to 'git+ssh'.

git clone git+ssh://[email protected]/devel/scripts.git

Comments

5

A way around this is explicitly mentioning the address by using quotes. Instead of using: git clone ssh://[email protected]/devel/scripts.git

Try: git clone 'ssh://[email protected]/devel/scripts.git'

Comments

-1

I had similar issue when trying from windows Git GUI. I executed the command via Git Bash and it worked for me without this error.

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.