Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.5k views
in Technique[技术] by (71.8m points)

git - go get results in 'terminal prompts disabled' error for github private repo

I created the private repo examplesite/myprivaterepo using the Github UI from my browser.

Then I went to my go directory (on the desktop) and cloned it:

$ cd $GOPATH
$ go get github.com/examplesite/myprivaterepo

So far so good. Created the file scheduler.go, added to repo, and pushed.

$ vim scheduler.go
$ git add scheduler.go
$ git commit
$ git push

Everythng's OK. But when I went to a clean laptop and tried to clone the repo, I got an error:

# Now on laptop, which doesn't yet know about the repo
$ cd $GOPATH
$ go get github.com/examplesite/myprivaterepo
# At this point it should ask for my user ID and password ,right? But it doesn't.
# Instead, this error occurs:
cd .; git clone https://github.com/examplesite/myprivaterepo /Users/tom/go/src/github.com/examplesite/myprivaterepo
Cloning into '/Users/tom/go/src/github.com/examplesite/myprivaterepo'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
package github.com/examplesite/myprivaterepo: exit status 128

Why is my laptop hating on my own repo and how can I get it to accept its fate? Thanks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...