go get报错:fatal: could not read Username ... terminal prompts disabled

问题terminal prompts disabled

go get an error 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

solution

Option One

Temporary solution: manually enter user name and password

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

Option II

Long-term solution: use the configured key git

For example to GITHUB

git config --global --add url."[email protected]:".insteadOf "https://github.com/"
Published 27 original articles · won praise 2 · views 50000 +

Guess you like

Origin blog.csdn.net/jackgo73/article/details/90604180