"fatal: protocol error: bad line length character: No This",fatallength


git clone 远程地址时候出现 "fatal: protocol error: bad line length character: No This" 错误

在stackoverflow上查到的是修改~/.bashrc文件采用 echo "错误信息" 1&2>/dev/null 来忽略错误提示

我出现这种问题的原因是:

/etc/passwd文件里面

git:x:501:502::/home/git:/sbin/nologin

修改成为

git:x:501:502::/home/git:/usr/local/git/bin/git-shell

查找自己系统上安装的git-shell路径方法为

locate git-shell

我的搜索结果是/usr/local/git/bin/git-shell

希望我的解决办法对你能有所帮助。

相关内容

    暂无相关文章