首页 > 解决方案 > Jenkins GO 运行失败,出现 git 128

问题描述

伙计们,我正在尝试运行一些 go 测试。似乎是盒子上的 git 配置失败?

git version 1.8.3.1在有人问之前就跑了……去版本1.13.1

在我的 mac 和 linux 上为我本地构建传递...但在 Jenkins 中似乎失败了

go test -v ./... -tags=unit
go: bitbucket.org/xxxxxxx/yyyyyyy@v1.0.82 requires
    cloud.google.com/go/storage@v1.6.0 requires
    cloud.google.com/go@v0.53.0 requires
    cloud.google.com/go/bigquery@v1.3.0 requires
    golang.org/x/exp@v0.0.0-20191030013958-a1ab85dbe136: invalid version: git fetch --unshallow -f https://go.googlesource.com/exp in /var/lib/jenkins/go/pkg/mod/cache/vcs/879ce674f4d9f0a3a3f207a6503e782bb2113f1a3d0c1f8049cc523b96d9aa9e: exit status 128:
    fatal: git fetch-pack: expected shallow list
make[1]: *** [unit-test] Error 1
make[1]: Leaving directory `/var/lib/jenkins/workspace/xxxxxx/yyyyy'
make: *** [test] Error 2
Build step 'Execute shell' marked build as failure
[Slack Notifications] found #1 as previous completed, non-aborted build
[Slack Notifications] will send OnEveryFailureNotification because build matches and user preferences allow it
Finished: FAILURE

标签: gojenkins

解决方案


解决方法很简单,git在 GCP 中升级版本


推荐阅读