2

I'm trying to clone a git repo from a remote server through SSH. I can connect normally to the server ssh [email protected] 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 [email protected]: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.

3
  • i suppose that it's a linux server, but I dont get why the "response" is C:\Repositories> Commented Jul 9, 2013 at 10:45
  • @grafa that would be because it is not a linux server. Commented Jul 9, 2013 at 11:10
  • Indeed, it's not a Linux server. It's Windows Server 2008 R2. Commented Jul 9, 2013 at 11:26

1 Answer 1

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.

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

3 Comments

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://[email protected]/C:/Repositories/repo.gitbut that didn't work... Any idea? I'm feel like I'm really close to solving this issue!
@RGweb try: git clone ssh://[email protected]/C/Repositories/repo.git (without the ':')
@RGweb that would be superuser.com/a/325838/141, then. (which is more detailed than in stackoverflow.com/q/225291/6309)

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.