<p>git clone 远程地址时候出现 "fatal: protocol error: bad line length character: No This" 错误</p><p>在stackoverflow上查到的是修改~/.bashrc文件采用 echo "错误信息" 1&2>/dev/null 来忽略错误提示</p><p>我出现这种问题的原因是:</p><p>/etc/passwd文件里面</p><p>git:x:501:502::/home/git:/sbin/nologin</p><p>修改成为</p><p>git:x:501:502::/home/git:/usr/local/git/bin/git-shell</p><p>查找自己系统上安装的git-shell路径方法为</p><p>locate git-shell</p><p>我的搜索结果是/usr/local/git/bin/git-shell</p><p>希望我的解决办法对你能有所帮助。</p>