I set up a git server and want now to push initially my repo from the client.
I used git push origin master
and get this error message:
fatal: protocol error: bad line length character: Unab
I don't know what's wrong. I don't know what "Unab" is. I tried to resize the shell but it is still "Unab". I cannot find a solution for this error message.
I setup the server with "authorized_keys" and SSH. (I can connect to it, using SSH.)
It seems to be a git problem?
BTW: The server is set up in a Windows 7 VM
We ran into this as well.
I don't know the gitty details about what went wrong, but in our case what triggered it was that the disk on the server was full.
FYI I got this same error message after I upgraded a CentOS6 container to CentOS7 -- some git operations started failing when building the container, e.g.
Running ssh gave me an error I could search on:
That led me to https://github.com/wolfcw/libfaketime/issues/63 where I realized I had forgotten I had a
LD_PRELOAD=/usr/local/lib/faketime/libfaketime.so.1
in a parent Dockerfile. Commenting that out fixed the error.For me adding the same host details into Putty with the private key (convert with puttygen) worked. Any git bash commands after that had no problems.
Late answer here, but hope it will help someone. If its a protocol error, it has to do something with your local git not able to communicate to the remote git. This can happen if you cloned the repo via ssh and sometime later, you lost the keys to the repo or your ssh agent cannot find those keys anymore.
Solution
Generate a new key and add it your git repo or configure your ssh agent to load the keys if you still have the keys with you & not with someone else ;)
Another quick fix is to go to your
.git
directory and edit theconfig
file's[remote "origin"] url
fromgit
tohttp
so that ssh keys are not needed to push and it will revert to asking your username and password.Change to