我是靠谱客的博主 繁荣板栗,这篇文章主要介绍windows下 代码在码云用vs code 执行go get报错terminal prompts disabled,现在分享给大家,希望可以做个参考。

获取码云上文件,go get 或go mod tidy报 terminal prompts disabled错误

go: gitee.com/xxx/xxx@v0.0.0-20191204091802-xxx: invalid version: git fetch -f https://gitee.com/xxx/xxx/heads/*:refs/heads/* refs/tags/*:refs/tags/* in C:Usersxxxgopkgmodcachevcsxxx: exit status 128:
        fatal: could not read Username for 'https://gitee.com': terminal prompts disabled

 

执行下述操作

1.vscode设置环境变量GOPROXY=https://goproxy.cn,direct

go env -w GOPROXY=https://goproxy.io,direct
# Set environment variable allow bypassing the proxy for selected modules
go env -w GOPRIVATE=*.corp.example.com
go env -w GO111MODULE=on
 

2.git config --global --add url."git@gitee.com:".insteadOf "https://gitee.com/"

2.go mod tidy 成功

 

最后

以上就是繁荣板栗最近收集整理的关于windows下 代码在码云用vs code 执行go get报错terminal prompts disabled的全部内容,更多相关windows下内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(109)

评论列表共有 0 条评论

立即
投稿
返回
顶部