[Solved] Go get fatal: could not read Username for ‘https://code.xxx.org’: terminal prompts disabled

When downloading the private codebase with go get, the following error was somehow generated, while the public codebase was not affected.

chenchideMacBook-Pro:~ chenchi$ go get code.xxx.org/adarch/kitedemo

# cd .; git clone https://code.xxx.org/adarch/kitedemo.git /Users/chenchi/go/src/code.xxx.org/adarch/kitedemo

Cloning into ‘/Users/chenchi/go/src/code.xxx.org/adarch/kitedemo’…

fatal: could not read Username for ‘https://code.xxx.org’: terminal prompts disabled

package code.xxx.org/adarch/kitedemo: exit status 128

 

 

Solution:

Enter the following command.

env GIT_TERMINAL_PROMPT=1 go get code.xxx.org/adarch/kitedemo

You will be prompted to enter your username and password, and then it works perfectly.

chenchideMacBook-Pro:~ chenchi$ env GIT_TERMINAL_PROMPT=1 go get code.xxx.org/adarch/kitedemo

Username for ‘https://code.xxx.org’: chenchi.szt

Password for ‘https://[email protected]’:

Of course, you can also git clone directly.

Similar Posts: