Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.