git - git 中错误的配置选项

标签 git ssh configuration

昨天,我们的团队成员更改了 ssh_config 文件中的两行,因为如果没有 ssh 隧道中断,就不可能起床去洗手间。现在,git 无法从我们的存储库中将任何东西 pull 到机器上。这是我们得到的错误(前天 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 中。

关于git - git 中错误的配置选项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30899828/

相关文章:

git - 有没有从点或分支原点到 "git diff"的快速方法?

git - 在生产服务器上使用Jenkins进行部署的最佳方法

git - 多个 github 帐户 : what values for Host in . ssh/config?

emacs - emacs服务器没有启动怎么启动?

git:在输入消息的过程中中止提交

Git 错误 : src refspec master does not match any error: failed to push some refs

Git 在 Docker 容器中运行太慢

security - SFTP 到 EC2 Windows 实例

c# - ConfigurationPropertyCollection 是否需要是静态的?

c# - 如何在 ASP.NET 样板中设置社交登录?