重启本地GitLab Runner后出现The remote end hung up unexpectedly错误求助
GitLab Runner 代码拉取报错问题记录
问题概述
已找到临时解决方法,但未明确问题根源,特此留存以寻求原因分析及长期规避方案。
错误日志
设置git深度为20拉取变更... 重新初始化/home/gitlab-runner/builds/i3fxSC2v/0/occ/groupsyncer/.git/中的现有Git仓库
fatal: git fetch-pack: expected shallow list
fatal: The remote end hung up unexpectedly
清理项目目录及文件变量 00:00
相关背景
- 上次任务成功运行在10天前
- 期间托管Runner的服务器及GitLab实例均已完成重启
- 删除构建目录后重新执行任务,问题消失;推测与缓存变动有关,但不确定具体触发因素
Runner 配置文件(toml)
listen_address = "0.0.0.0:9103" concurrent = 6 check_interval = 0 log_level = "warning" [session_server] session_timeout = 1800 [[runners]] name = "shell-runner" url = "https://gitlab.example.com/" token = "REDACTED" executor = "shell" pre_build_script = "mkdir -p $HOME/.docker/ && echo \"{ \\\"proxies\\\": { \\\"default\\\": { \\\"httpProxy\\\": \\\"$HTTP_PROXY\\\", \\\"httpsProxy\\\": \\\"$HTTPS_PROXY\\\", \\\"noProxy\\\": \\\"$NO_PROXY\\\" } } }\" > $HOME/.docker/config.json" environment = ["https_proxy=http://squidproxy.example.com:3128", "http_proxy=http://squidproxy.example.com:3128", "HTTPS_PROXY=squidproxy.example.com:3128", "HTTP_PROXY=squidproxy.example.com:3128", "no_proxy=gitlab.example.com", "NO_PROXY=gitlab.example.com,docker,thealias"] clone_url = "https://gitlab.example.com" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure]
内容的提问来源于stack exchange,提问作者Brandon Kauffman
相关产品推荐
相关产品推荐

