我有 Windows 2008 R2 Server 标准版。我安装了 FreeSSHd 和 Git。 Windows 防火墙已将异常(exception)设置为端口 22。我将 SSH 服务器设置为仅接受 SSH 公钥。我可以使用终端(即 ssh gregory@hostname
)正常登录服务器。当我去使用 git clone
命令时(例如 git clone ssh://gregory@hostname/path_to_my_repo
)我得到这个错误:
fatal: protocol error: bad line length character: Unab
我完全不知道是什么原因造成的。我启用了 Shell、SFTP 和隧道协议(protocol)。
最佳答案
忘记 freeSSHd。它不能配置为与 git 一起运行。
您有两个(据我所知)选择 - 使用更复杂的 Windows SSH 服务器,然后实现它: http://holyhoehle.wordpress.com/2011/01/26/setting-up-a-git-server-on-windows-server-2008-r2-using-msysgit-and-winsshd/
或者使用 OpenSSH (CopSSH)
http://java2cs2.blogspot.de/2010/03/setup-git-server-on-windows-machine.html
http://www.timdavis.com.au/git/setting-up-a-msysgit-server-with-copssh-on-windows/
Setup a Git server with msysgit on Windows
http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP
关于git - 致命的 : protocol error: bad line length character: Unab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9661276/