我是靠谱客的博主 老迟到月光,这篇文章主要介绍go get报错:fatal: could not read Username ... terminal prompts disabled,现在分享给大家,希望可以做个参考。

问题terminal prompts disabled

go get 报错 terminal prompts disabled

go get xxx.com/xxx/xxx
# cd .; git clone https://xxx.com/xxx/xxx.git
Cloning into 'xxx'...
fatal: could not read Username for 'https://xxx.com: terminal prompts disabled
package xxx: exit status 128

解决方案

方案一

临时解法:手动输入用户名密码

env GIT_TERMINAL_PROMPT=1 go get xxx.com/xxx/xxx

方案二

长期解法:使用已经配置好的git密钥

以GITHUB为例

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

最后

以上就是老迟到月光最近收集整理的关于go get报错:fatal: could not read Username ... terminal prompts disabled的全部内容,更多相关go内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部