下载gitlab私有仓库时出现
fatal: could not read Username for 'http://gitlab.secwx.com': terminal prompts disabled
这是因为私有仓库需要输入密码,而go get,默认关闭终端输入,解决办法:
export GIT_TERMINAL_PROMPT=1
下载gitlab私有仓库出现
go: gitlab.xxxxx.com/xxxx/xxxx@v0.0.0-20200604101819-23130a9c3be4: reading https://goproxy.io/gitlab.secwx.com/clearvision/godictor/@v/v0.0.0-20200604101819-23130a9c3be4.mod: 404 Not Found
server response: not found:
这是应为走代理不能访问到私有仓库,默认私有仓库跳过代理,解决办法:
go env -w GOPRIVATE=gitlab.*.com
如果还不行需要加上:
go get -insecure xxxxxx
跳过https
网友评论