Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git clone "fatal: I don't handle protocol 'ssh'"

Tags:

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.

like image 689
igorsantos07 Avatar asked Mar 21 '14 18:03

igorsantos07


People also ask

Do you need an SSH key to clone a repo?

Git will need a ssh key only if you are using ssh protocol - there doesn't exist such a thing as anonymous ssh, ssh needs a key (an account) to work. If you use git or https protocol, no ssh key is needed. If you don't want to use accounts / authentication, git protocol might be your best bet.

What protocol does git clone use?

The SSH Protocol Probably the most common transport protocol for Git is SSH. This is because SSH access to servers is already set up in most places — and if it isn't, it's easy to do. SSH is also the only network-based protocol that you can easily read from and write to.


1 Answers

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

like image 165
wytten Avatar answered Sep 28 '22 02:09

wytten