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

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

问题描述

我建立了一个git服务器,并且现在想要最初从客户端推送我的repo。
我使用 git push origin master 并得到这个错误信息:

I set up a git server and want now to push initially my repo from the client. I used git push origin master and get this error message:

fatal: protocol error: bad line length character: Unab

我不知道错在哪里。我不知道Unab是什么。我试图调整外壳的大小,但它仍然是Unab。
我无法找到此错误消息的解决方案。

I don't know what's wrong. I don't know what "Unab" is. I tried to resize the shell but it is still "Unab". I cannot find a solution for this error message.

我使用authorized_keys和SSH设置服务器。 (我可以连接到它,使用SSH。)

I setup the server with "authorized_keys" and SSH. (I can connect to it, using SSH.)

这似乎是一个混帐问题?

It seems to be a git problem?

BTW :服务器设置在Windows 7虚拟机中

BTW: The server is set up in a Windows 7 VM

推荐答案

这个错误信息有点不明确,但它实际上是在尝试告诉你,远程服务器没有回复正确的git响应。最终,运行 git-receive-pack 进程的服务器出现问题。

This error message is a bit obtuse, but what it's actually trying to tell you is that the remote server didn't reply with a proper git response. Ultimately, there was a problem on the server running the git-receive-pack process.

在Git协议,前四个字节应该是行的长度。相反,它们是字符 Unab ...这可能是某种错误消息的开始。 (也就是说,它可能是无法...... 做某事)。

In the Git protocol, the first four bytes should be the line length. Instead, they were the characters Unab... which is probably the beginning an error message of some kind. (ie, it's probably "Unable to..." do something).

code> ssh< host> git-receive-pack<路径到git-repository> ?你应该看到你的git客户端正在攻击的错误信息,你可能会纠正它。

What happens when you run ssh <host> git-receive-pack <path-to-git-repository>? You should see the error message that your git client is barfing on and you may be able to correct it.

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

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