[go]go.mod 中的传递依赖失败 - 为什么“go mod why”下载东西
· 收录于 2024-01-06 07:33:06 · source URL
问题详情
我有这个不好玩的构建错误:
1057.1 github.com/ghodss/[email protected]: reading github.com/ghodss/yaml/go.mod at revision v1.0.0: git ls-remote -q origin in /go/pkg/mod/cache/vcs/5c75ad62eb9c289b6ed86c76998b4ab8c8545a841036e879d703a2bbc5fcfcea: exit status 128:
1057.1 fatal: unable to access 'https://github.com/ghodss/yaml/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.
------
Dockerfile.local.df:13
--------------------
11 | COPY go.mod go.in.mod
12 | RUN grep -v "^replace" "go.in.mod" > "go.mod" # remove replace lines from go.mod
13 | >>> RUN go mod download -x
14 | RUN go mod tidy
15 |
--------------------
ERROR: failed to solve: process "/bin/sh -c go mod download -x" did not complete successfully: exit code: 1
所以我运行这个来找出如何摆脱 dep:
% go mod why -m github.com/ghodss/yaml
go: downloading github.com/stretchr/testify v1.8.1 # <---- why ?
go: downloading github.com/onsi/ginkgo v1.16.5 # <---- why ??
# github.com/ghodss/yaml
(main module does not need module github.com/ghodss/yaml)
我不明白为什么要去 mod 为什么要
下载那些 - 也许是更新的 depedencies?
摆脱这个 github.com/ghodss/yaml
项目的最佳方法是什么?
最佳回答
暂无回答