Git 远程 : Error: fatal: protocol error: bad line length character: Unab

标签 git ssh authorized-keys

我设置了一个 git 服务器,现在想从客户端推送我的 repo。 我使用 git push origin master 并收到此错误消息:

fatal: protocol error: bad line length character: Unab

不知道怎么回事。我不知道“Unab”是什么。我试图调整 shell 的大小,但它仍然是“Unab”。 我找不到此错误消息的解决方案。

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

好像是git的问题?

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

最佳答案

这个错误信息有点晦涩,但它实际上是想告诉你远程服务器没有用正确的 git 响应来回复。最终,运行 git-receive-pack 的服务器出现问题过程。

在Git协议(protocol)中,前四个字节应该是行的长度。相反,它们是字符 Unab ...这可能是某种错误消息的开始。 (即,它可能是“Unable to...”做某事)。

运行 ssh <host> git-receive-pack <path-to-git-repository> 时会发生什么?您应该看到您的 git 客户端正在吐出的错误消息,您可以更正它。

关于Git 远程 : Error: fatal: protocol error: bad line length character: Unab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8170436/

相关文章:

linux - tqdm 停止在终端 "... (more hidden) ..."中显示进度

ssh - 与 x11 的 CLion WSL ssh session

docker - 如何在没有任何身份验证的情况下使用ssh登录?

ssh - ssh 和 authorized_keys 有问题

linux - 在无密码 ssh 登录后检查远程用户的身份?

git - 是否可以在一个Git项目的所有分支中执行一个 'grep search'?

ruby-on-rails - 适用于小型开发人员和设计人员团队的 Git 工作流程

git - git 远程名称中哪些字符是非法的?

git - GitHub 上的 "This branch is 0 commits ahead and 0 commits behind master"是什么意思?

git push 返回 "fatal: protocol error: bad line length character"