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

前端 未结 7 1554
余生分开走
余生分开走 2020-11-30 16:50

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:



        
7条回答
  •  北荒
    北荒 (楼主)
    2020-11-30 17:00

    If you configure your gitconfig with this option, you will later have a problem cloning other repos of GitHub

    git config --global --add url. "Git@github.com". Instead, "https://github.com/"
    

    Instead, I recommend that you use this option

    echo "export GIT_TERMINAL_PROMPT=1" >> ~/.bashrc || ~/.zshrc
    

    and do not forget to generate an access token from your private repository. When prompted to enter your password, just paste the access token. Happy clone :)

提交回复
热议问题