2

I'm trying to clone a git repo from a remote server through SSH. I can connect normally to the server ssh myName@192.168.1.1 If I run this I get the prompt to fill in my password and get a response from the server C:\Respositories> and I can run command on the server.

But when I try to git clone myName@192.168.1.1:repo.git I get the following error:

fatal: protocol error: bad line length character:
C:

I've searched around the internet and found quite a few questions on here concerning the same errors and they all say it has to do with the response of the server. And I found that the server always responds with C:\Repositories>

And none of these questions I've found have a solution to my problem. So I'm hoping someone can help me.

RGweb
  • 109
  • 3
  • 8

1 Answers1

1

bad line length character

That means an ssh session on your server doesn't just return the output of the git command.
It returns first some kind of prompt, which isn't compatible with a git command.

As I mention in "I cannot push to my new remote server GIT in windows 7", an easier setup seems to be an openssh under Cygwin, rather than a WinSSH.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I've now installed openSSH under Cygwin and I can connect to the server and don't get the same error anymore. But now I have a different problem. It's now telling me `Could not read from remote repository`. I think the problem is that I'm not giving it the correct path to the repo. The repo is in `C:/Repositories`, I've tried `git clone ssh://myName@192.168.1.1/C:/Repositories/repo.git`but that didn't work... Any idea? I'm feel like I'm really close to solving this issue! – RGweb Jul 09 '13 at 12:18
  • @RGweb try: `git clone ssh://myName@192.168.1.1/C/Repositories/repo.git` (without the '`:`') – VonC Jul 09 '13 at 12:26
  • @RGweb that would be http://superuser.com/a/325838/141, then. (which is more detailed than in http://stackoverflow.com/q/225291/6309) – VonC Jul 09 '13 at 12:30