我有一个带有 Go 模块的(私有)github 存储库。我添加了标签v0.1
,github 显示了该标签。我已经设置go env -w GOPRIVATE=github.com/dwschulze/key-value-mod
并且我的 ~/.gitconfig 有[url "git@github.com:"] insteadOf = https://github.com/
但go get
无法检索我的模块:
$ go get github.com/dwschulze/key-value-mod
go: github.com/dwschulze/key-value-mod upgrade => v0.0.0-20210907155619-9116b97467d6
go get: github.com/dwschulze/key-value-mod@v0.0.0-20210907155619-9116b97467d6: parsing go.mod:
module declares its path as: key-value-mod
but was required as: github.com/dwschulze/key-value-mod
$ go get github.com/dwschulze/key-value-mod@v0.1
go get github.com/dwschulze/key-value-mod@v0.1: no matching versions for query "v0.1"
有什么问题go get
?