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

引用: https://blog.csdn.net/jackgo73/article/details/90604180

Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐