0

I am trying to create a git repo on localhost. I followed the following tutorial: https://linuxprograms.wordpress.com/2010/05/10/how-to-set-up-a-git-repository-locally/ Everything works fine until I try to make the first push. I get the following error:

fatal: protocol error: bad line length character: JAVA

Many questions similar to this, suggests that I should look for echo statements in .bashrc file. But there are no echo statements there. I get the same error when I try to push to a remote repo as well.

Community
  • 1
  • 1
Anvith
  • 477
  • 9
  • 22
  • See http://stackoverflow.com/questions/8170436/git-remote-error-fatal-protocol-error-bad-line-length-character-unab. –  Feb 11 '15 at 05:46

3 Answers3

0

I've read that this can happen due to of problems with the Shell access (is the access allowed?) on the server..

Perhaps this link would be of any help: Git Remote: Error: fatal: protocol error: bad line length character: Unab. It seems related.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Joey Dorrani
  • 247
  • 1
  • 1
  • I do have shell access, however not sure if I have to explicitly pass on the authentication info also? – Anvith Feb 11 '15 at 06:05
0

You can try the following:

usermod -s /bin/bash git

Also, the following post might provide more information on this: ref

Reason (Quoted from post):

The reason for changing the login shell is because the default shell for the git user is /sbin/nologin (or similar, depending on environment), which prevents the git application from logging in as the git user on the git server.

Community
  • 1
  • 1
nitishagar
  • 9,038
  • 3
  • 28
  • 40
0

I've seen this a few time when run through TeamCity. In our case the /tmp space is full, clearing it removes the problem.

Unfortunately I can't explain why this causes the problem.

P Farrar
  • 1
  • 1
  • 1