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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…