5

I'm trying to clone any repo by git:// protocol and get this error.

fatal: protocol error: bad line length character: SSH-

If I'll change protocol to https:// git will clone without errors.This error occurs only in Ubuntu (12.04, 12.10), on Debian or Fedora I can clone repo without any problems.

May be someone had the same problem and can help me, I searched everywhere and didn't find any solution.

1 Answers1

4

In case this can help someone. I had a similar issue.

My .bashrc on the remote server was printing information such as the contents of /etc/issue. Git would pick up this information and produce the error you have.

I fixed it by commenting out all lines that produced output to terminal in my .bashrc.

Radu Rădeanu
  • 169,590
Sly
  • 41
  • 2