大佬教程收集整理的这篇文章主要介绍了go get results in 'terminal prompts disabled' error for github private repo,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
git config --global --add url."git@github.com:".insteadOf "https://github.com/"
@H_489_2@go get 默认禁用“终端提示”。这可以通过设置 git 的环境变量来更改:
env GIT_TERMINAL_PROMPT=1 go get github.com/examplesite/myprivaterepo
$ cd $GOPATH
$ go get github.com/examplesite/myprivaterepo
@H_489_2@到现在为止还挺好。创建文件 scheduler.go,添加到 repo 并推送。
$ vim scheduler.go
$ git add scheduler.go
$ git commit
$ git push
@H_489_2@一切正常。但是当我找到一台干净的笔记本电脑并尝试克隆 repo 时,出现错误:
# 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
@H_489_2@为什么我的笔记本电脑讨厌我自己的回购,我怎样才能让它接受它的命运?谢谢。
以上是大佬教程为你收集整理的go get results in 'terminal prompts disabled' error for github private repo全部内容,希望文章能够帮你解决go get results in 'terminal prompts disabled' error for github private repo所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。