【发布时间】: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,这是当前日期。