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?
First, you have variables like
export GIT_TRACE=1andexport GIT_TRACE_PACKET=1which 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
.bashrcon the server side with an echo in it.See also Git FAQ
Other causes include:
--exec-pathfrom theserver_argon the server sideNote: with Git 2.6+ (Q3 2015), see also “
GIT_TRACE_PACKFILE“.