当前位置:   article > 正文

go get报错:fatal: could not read Username ... terminal prompts disabled_go get报错:fatal: could not read username ... termin

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
  • 1
  • 2
  • 3
  • 4
  • 5

解决方案

方案一

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

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

方案二

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

GITHUB为例

git config --global --add url."git@github.com:".insteadOf "https://github.com/"
  • 1
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/680907
推荐阅读
相关标签
  

闽ICP备14008679号