小编nov*_*ack的帖子

私人回购-1.13-`go mod ..`失败:ping“ sum.golang.org/lookup” ..验证包.. 410不见了

我正在使用golang 1.13。

我有一个依赖于私人gitlab项目的项目。

我有相同的ssh键。

当我尝试为新创建的模块检索依赖项时,出现以下错误:

$ go version
go version go1.13 linux/amd64

$ go mod why
go: downloading gitlab.com/mycompany/myproject v0.0.145
verifying gitlab.com/mycompany/myproject@v0.0.145: gitlab.com/mycompany/myproject@v0.0.145: reading https://sum.golang.org/lookup/gitlab.com/mycompany/myproject@v0.0.145: 410 Gone
Run Code Online (Sandbox Code Playgroud)

我不知道为什么要尝试ping sum.golang.org/lookup,因为它是一个私有gitlab项目。

我的〜/ .gitconfig包含以下内容(基于我在google搜索中查找的类似错误)

# Enforce SSH
[url "ssh://git@github.com/"]
  insteadOf = https://github.com/
[url "ssh://git@gitlab.com/"]
        insteadOf = https://gitlab.com/
[url "ssh://git@bitbucket.org/"]
  insteadOf = https://bitbucket.org/
[url "git@gitlab.com:"]
        insteadOf = https://gitlab.com/
Run Code Online (Sandbox Code Playgroud)

该错误仍然存​​在。

我希望将软件包从我的私人gitlab项目存储库下载到当前项目。

我有什么需要在我的私有gitlab项目存储库中做的事情,以使其准备好“开始使用”?

私有gitlab项目存储库已经包含该项目的go.sum和go.mod。

我有什么想念的吗?

编辑:1)私人回购名称和公司名称不包含星号或任何其他特殊字符。只有字母,甚至没有数字字符。

ssh go gitlab

13
推荐指数
2
解决办法
2895
查看次数

标签 统计

gitlab ×1

go ×1

ssh ×1