我从浏览器中使用Github UI创建了私人回购示例站点/myprivaterepo。
然后我进入我的go目录(在桌面上)并克隆它:
$ cd $GOPATH
$ go get github.com/examplesite/myprivaterepo
到目前为止一切顺利。创建文件调度程序。Go,添加到repo,并推送。
$ vim scheduler.go
$ git add scheduler.go
$ git commit
$ git push
的一切很好。但是当我去一台干净的笔记本电脑并试图克隆回购时,我得到了一个错误:
# 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
为什么我的笔记本电脑讨厌我自己的回购,我怎样才能让它接受它的命运?谢谢。