【问题标题】:git clone stalls on "Initializing NSS with certpath"git clone 在“使用 certpath 初始化 NSS”时停止
【发布时间】:2019-11-05 10:18:27
【问题描述】:

我正在 docker 容器中运行一个进程,该进程通过 gitlab 中的 https 定期执行 git 克隆。大多数情况下它都可以工作,但每隔一段时间它就会无限期地停顿,需要我手动销毁并重新创建 docker 容器来修复。当我启用设置GIT_TRACE=1GIT_CURL_VERBOSE=1--verbose时,我可以在日志中看到:

trace: run_command: 'git-remote-https' 'origin' 'https://myusername:mypassword@gitlab.com/username/reponame.git'
* Couldn't find host gitlab.com in the .netrc file; using defaults
* About to connect() to gitlab.com port 443 (#0)
*   Trying xx.xxx.xxx.xx...
* Connected to gitlab.com (xx.xxx.xxx.xx) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none

我对这个错误的不一致性质感到最困惑。根据this other thread,我尝试设置git config http.postBuffer 524288000,但没有成功。我应该如何继续排除故障?谢谢

【问题讨论】:

  • 您能告诉我们您使用的是哪个操作系统和哪个版本的 Git (git --version)?
  • 我正在运行 CentOS7 和 git 版本 1.8.3。我确实尝试更新到 git 版本 >= 2.x.x 但看到同样的问题出现了。
  • 我也不认为这是日期问题。我在 ssh 进入盒子后刚刚运行 date,这是当前日期。

标签: git docker curl gitlab


【解决方案1】:

事实证明,这个问题完全在不同的层面上,与任何标记的技术无关。这是基于 MTU 配置的错误。我正在运行 git 进程的机器的 MTU 值非常接近路由器接受的 MTU 值。在将数据包的大小加上其数据包覆盖后,最终的数据包大小超过了路由器接受的 MTU 值,因此丢弃了该数据包。解决方案是提高路由器接受的 MTU 值。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-10-21
    • 2021-08-21
    相关资源
    最近更新 更多