2FA give problems when pushing to GitHub

前端 未结 5 1644
傲寒
傲寒 2020-12-15 06:10

I\'ve clone a project on GitHub on my Raspberry Pi, create a new branch and push everything to the repository. For this I needed next commands:

git clone htt         


        
5条回答
  •  误落风尘
    2020-12-15 06:41

    If you've cloned over https and want to keep using that, for whatever reason, you can edit .git/config to include the personal access token generated per https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line.

    A sample .git/config entry:

    [remote ""]
        url = https://:@github.com/
    

    This is putting your token key in this plain text file on your machine, which is bad, but if you need a quick hack to get things going, it works.

    Cheers!

提交回复
热议问题