美文网首页
Go get命令出现terminal prompts disab

Go get命令出现terminal prompts disab

作者: CommandM | 来源:发表于2018-01-04 19:46 被阅读2902次

    错误长这样

    ubuntu@ubuntu:~$ go get -u github.com/XXX/OOOO/
    # cd .; git clone https://github.com/XXX/OOOO/ /home/ubuntu/.go/src/github.com/XXX/OOOO/
    Cloning into '/home/ubuntu/.go/src/github.com/maoxs2/Proj_Ridal'...
    fatal: could not read Username for 'https://github.com': terminal prompts disabled
    package github.com/XXX/OOOO/: exit status 128
    

    原因go get disable "terminal prompt" by default(Go get 命令默认禁用terminal prompt,即终端提示)

    解决方案:环境设置GIT_TERMINAL_PROMPT=1

    export GIT_TERMINAL_PROMPT=1
    go get XXX
    

    后记:其实最终问题还是我记错库名了……

    相关文章

      网友评论

          本文标题:Go get命令出现terminal prompts disab

          本文链接:https://www.haomeiwen.com/subject/wpldnxtx.html