我正在尝试构建一个使用私有git存储库的go应用程序。我有一个用于我的github帐户的ssh密钥,并且在我的.gitconfig文件中有以下内容:
[url "https://username:token@github.com"]
insteadOf = https://github.com
[url "ssh://git@github.com/"]
insteadOf = https://github.com/
当我执行go测试或去构建时,我被要求输入密码。然后我得到一个回复:
go: found github.com/x/businesses in github.com/x/businesses v0.0.0-yy
go: cmd/main/cmd imports
github.com/x/businesses: github.com/x/businesses@v0.0.0-yy/go.mod:
verifying module: github.com/x/businesses@v0.0.0-yy/go.mod:
reading https://sum.golang.org/lookup/github.com/xx/businesses@v0.0.0-yy: 410 Gone
server response:
not found: github.com/x/businesses@v0.0.0-yy:
invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/*
in tmp/gopath/pkg/mod/cache/vcs/zz:
exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
我尝试在.gitconfig中删除顶部而不是Of,没有理由,然后尝试一些东西。
哆啦的时光机
相关分类