问题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/"