【问题标题】:bad configuration option in gitgit中的错误配置选项
【发布时间】:2020-03-16 18:42:22
【问题描述】:

昨天我们的团队成员更改了 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 找到任何远程相关的解决方案。

【问题讨论】:

    标签: git ssh configuration


    【解决方案1】:

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

    服务器配置选项通常位于/etc/ssh/sshd_config

    【讨论】:

    • 另请注意,更改本地 服务器 配置不会对本地 客户端 到远程服务器的传出连接产生任何影响。跨度>
    • 谢谢拉斯克斯和肯斯特!解决了问题!
    猜你喜欢
    • 1970-01-01
    • 2021-10-30
    • 2020-08-01
    • 2016-09-12
    • 1970-01-01
    • 2013-04-13
    • 1970-01-01
    • 1970-01-01
    • 2013-10-06
    相关资源
    最近更新 更多