git 中的错误配置选项

bad configuration option in git

昨天,我们的团队成员更改了 ssh_config 文件中的两行,因为如果没有 ssh 隧道中断,就不可能起床去洗手间。现在,git 无法从我们的存储库中向机器提取任何内容。这是我们得到的错误(git 前天工作正常):

Fetching origin
/etc/ssh/ssh_config: line 49: Bad configuration option: ClientAliveInterval
/etc/ssh/ssh_config: line 50: Bad configuration option: ClientAliveCountMax
/etc/ssh/ssh_config: terminating, 2 bad configuration options
fatal: The remote end hung up unexpectedly
error: Could not fetch origin

我查看了 ssh_config 文件,更改后的行对我来说没问题:

ClientAliveInterval 300
ClientAliveCountMax 2

这些值是否真的有问题,或者有人可以更改其他内容?我问这个是因为我看不出这两个配置选项是如何导致这种情况的,而且我还没有从 Google.

中找到任何远程相关的解决方案

比较 man ssh_configman sshd_configClientAliveIntervalClientAliveCountMax 是服务器选项,而不是客户端选项,这就是您看到该错误的原因。您的ssh客户端配置无效,导致客户端退出。

服务器配置选项通常会进入 /etc/ssh/sshd_config