2015-02-11 153 views
0

我想在本地主机上创建一个git回购。我遵循以下教程:https://linuxprograms.wordpress.com/2010/05/10/how-to-set-up-a-git-repository-locally/ 一切工作正常,直到我尝试进行第一次推。我得到以下错误:无法推送到本地git回购

fatal: protocol error: bad line length character: JAVA

许多问题与此类似,建议我应该寻找.bashrc文件echo语句。但是那里没有回声。当我尝试推送到远程回购时,也会遇到同样的错误。

+0

请参阅http://stackoverflow.com/questions/8170436/git-remote-error-fatal-protocol-error-bad-line-length-character-unab。 – 2015-02-11 05:46:15

回答

0

这是一个共同的问题,即错误:

fatal: protocol error: bad line length character: This 

我读过,这可能发生因与壳牌存取问题(是允许的访问?)在服务器上..

也许这个链接将有任何帮助:Git Remote: Error: fatal: protocol error: bad line length character: Unab。这似乎相关。

Goodluck! ;)

+0

我有shell访问,但不知道是否我必须显式传递身份验证信息? – Anvith 2015-02-11 06:05:58

0

你可以尝试以下方法:

usermod -s /bin/bash git 

此外,下面的帖子可能会提供更多这方面的信息:ref

原因(从邮报):

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.

0

在TeamCity运行时我已经看到过这几次。在我们的例子中,/ tmp空间已满,清除它将消除问题。

不幸的是我无法解释为什么会导致这个问题。