linux - Git 错误 : fatal: protocol error: bad line length character: git@

标签 linux git ssh

我在 Windows 计算机上设置 git 时遇到问题。我已经启动了一个 CentOS 7 的虚拟机来用作你自己的 GIT 服务器。每当我尝试通过 Windows 框连接到它时遇到问题,我在 Windows 上运行 msysgit 作为客户端。如果我通过 SSH 连接到 CentOS 服务器,并使用 git@localhost 执行相同的命令,它工作得很好。如果我使用另一台计算机,一台 linux 机器并执行图片中显示的步骤,它也可以正常工作。如果我从 msysgit 通过 SSH 连接到 git@192.168.100.18,它就可以工作。它只发生在我的 Windows 机器上。我试过重新安装 msysgit 软件。知道是什么导致了这个错误吗?

致命:协议(protocol)错误:错误的行长字符:git@

谢谢!

Issue having in console example

最佳答案

我也遇到了这个问题。在控制台中尝试我的 Remote 之后

ssh git@gitlab.comlinks.cz

我发现我忘记启动 ssh 代理,所以服务器响应

git@gitlab.comlinks.cz的密码:

等待密码。身份验证尚未完成,因此 git 服务器不在另一端,但登录过程在那里。因此,请先测试您的连接。

关于linux - Git 错误 : fatal: protocol error: bad line length character: git@,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38366592/

相关文章:

c - 在 Linux 下通过管道使用流是否值得?

位于 Raspbian 上的 rc.local 中的 Python 脚本在启动时未启动

linux - 如何在Shell脚本中多次检查if条件?

git - 如何查看 git checkout 标签历史记录?

git - Atlassian Stash - 权限被拒绝(公钥)

c - C/Linux 中的线程执行时间

git - 将公共(public)代码添加为 git 子模块 : "already exists in the index" 的问题

git - 如何让 Git 在 Windows 上的 git gui 中停止跟踪文件夹

linux - 通过 ssh 从最新更改的目录中获取 Tar 文件

linux - Bash - 了解 SSH 隧道是否已正确创建