致命的:协议错误:坏行长度字符:Unab [英] fatal: protocol error: bad line length character: Unab

查看:262
本文介绍了致命的:协议错误:坏行长度字符:Unab的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Windows 2008 R2服务器标准版。我有FreeSSHd与Git一起安装。 Windows防火墙的例外设置为端口22.我的SSH服务器设置为仅接受SSH公钥。我可以使用终端(即 ssh gregory @ hostname )登录到服务器。当我使用 git clone 命令(例如 git clone ssh:// gregory @ hostname / path_to_my_repo )时,得到这个错误:


fatal:协议错误:坏行长度字符:Unab


我对导致它的原因有绝对的损失。我已经启用了Shell,SFTP和Tunnel协议。

解决方案

忘记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 /



在Windows上使用msysgit设置Git服务器



http://code.google.com/p/tortoisegit/wiki/HOWTO_CentralServerWindowsXP


I have a Windows 2008 R2 Server Standard Edition. I have FreeSSHd installed along with Git. Windows firewall has exceptions set to port 22. I have the SSH server setup to accept only SSH public keys. I can login to the server fine using terminal (i.e. ssh gregory@hostname). When I go to use the git clone command (e.g. git clone ssh://gregory@hostname/path_to_my_repo) I get this error:

fatal: protocol error: bad line length character: Unab

I am at an absolute loss as to what's causing it. I have Shell, SFTP and Tunnel protocols enabled.

解决方案

Forget freeSSHd. It cannot be configured to run with git.

You have two (as far as I could find) choices - go with a more sophisticated SSH server for Windows and then implement this: http://holyhoehle.wordpress.com/2011/01/26/setting-up-a-git-server-on-windows-server-2008-r2-using-msysgit-and-winsshd/

or go with 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

这篇关于致命的:协议错误:坏行长度字符:Unab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆