I was using SourceTree + Git on Windows without any problem. I was able to use git commands from command (terminal/BASH). I prefer to use terminal for git push/pull etc. Unfortunately, after reinstallation of my machine (server/git are the same), I'm getting this painful error.
On a new machine, I installed Git 1.9.5 (Git-1.9.5-preview20141217.exe) and configured to use BASH only and plink with proper SSH key file.
I can do git log
on my repository, but git pull
or git push
gives this error:
me@NEW-MACHINE /c/Workspace/project (master)
$ git pull
fatal: protocol error: bad line length character:
@-
ERROR: Problem parsing the command line arguments.
Of course, I searched many articles related to "fatal: protocol error: bad line length character". But, couldn't find any clue.
Interestingly, on SourceTree, I can do git pull
or push
successfully. I'm only getting this error in BASH terminal. Note that SourceTree doesn't use embedded git.
Here are my investigations so far:
- I installed an older version of git (1.8.x), still getting error.
- Moved .bashrc, but no good.
- Obviously, not a problem of SourceTree as SourceTree doesn't use embedded Git.
- The server is in Github (enterprise, private).
- I have no problem using any git commands on my Linux with the same git repository/server.
My clue is <newline>@-<newline>
from the error message. It is more like a problem of Windows/BASH-specific problem. I can't figure it out what causes "@-".
Edit: I tried suggestions in this thread, but didn't solve my problem. The git server is github.mycompany.com
, which doesn't allow any ssh
connection.