fatal: protocol error: bad line length character: Inva

fatal: protocol error: bad line length character: Inva

从 Openshift.I 中安装的 bpm 套件克隆存储库时出现以下 git 错误。

严重:协议错误:错误的行长度字符:Inva

请帮我解决这个问题。

使用 ssh url(如 git@aserver:arepo)时通常会出现此错误

通常的原因是,在 git 存储库托管服务器端,包含一些回显的 .profile 或 .bashrc:请参阅 Git FAQ

It likely means you have some extraneous characters, info message or something upon logging into ssh in command mode.

要对此进行测试,请执行以下操作:

ssh user@git.example.com echo testing commands

You should only see testing commands returned. If there are any other characters, you should examine your dot shell rc file to find any echo or other commands that may produce output.

对于您的情况,对于 Openshift,consider one of the common commands:

rhc ssh ls

检查 ls 是否被任何其他输出污染。