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

查看:29
本文介绍了Git Remote:错误:致命:协议错误:行长度错误字符: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.)

这似乎是一个 git 问题?

It seems to be a git problem?

顺便说一句:服务器设置在 Windows 7 VM 中

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).

运行 ssh 时会发生什么?git-receive-pack ?您应该会看到您的 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 Remote:错误:致命:协议错误:行长度错误字符:Unab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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