1

I have git installed and working as expected on my local system or a network share, but have not been able to get it to access the remote bare repository on my server using ssh.

I have installed msysgit and CopSSH on the server and msysgit, putty and tortoisegit on my local system. I am able to open a putty session or use plink successfully -- at least I believe plink is successful, but more on that in a bit.

When I attempt to clone a remote repository I get this:

D:\Temp> git clone uname@server:e:/path/test.git Test
Cloning into Test...
fatal: protocol error: bad line length character: Micr

The error message has been consistent for a while, but at times (from one reinstall attempt to another) the last four characters will be 'Micr', 'Allo' or something else I don't remember right now. In the currently installed state it is 'Micr'.

So the big question is what am I not doing right?

Although I imagine it would be much easier to correct what was wrong if I could get the actual error message instead of the generic one followed by the first four characters of the actual error message. Any idea if that is possible?

David Culp
  • 5,354
  • 3
  • 24
  • 32

1 Answers1

3

First, you have variables like export GIT_TRACE=1 and export GIT_TRACE_PACKET=1 which can help debugging this kind of situation.

Second, this error is often caused by any kind of display done during the ssh session (see for instance this thread), like a .bashrc on the server side with an echo in it.

I have a wrapper set-up around ssh that sets the window title of the shell to the ssh command argument. That is what messes things up!

See also Git FAQ

Other causes include:


Note: with Git 2.6+ (Q3 2015), see also "GIT_TRACE_PACKFILE".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Basically, avoid an interective shell in your ssh session: http://www.bramschoenmakers.nl/node/303 – VonC Aug 02 '11 at 03:56
  • nothing in the rc or profile files that look like they would echo. I'll look over the linked articles in more detail tonight. The trace flags are likely to be the most useful though, thanks. – David Culp Aug 02 '11 at 17:22