Git Clone from GitHub over https with two-factor authentication

后端 未结 6 1774
感动是毒
感动是毒 2021-01-29 23:49

I recently began using two-factor authentication on GitHub, and I am now unable to use git over https on private repos in the usual way:

peter@computer:~$ git cl         


        
6条回答
  •  执念已碎
    2021-01-30 00:33

    1st: Get personal access token. https://github.com/settings/tokens
    2nd: Put account & the token. Example is here:

    $ git push
    Username for 'https://github.com':            # Put your GitHub account name
    Password for 'https://{USERNAME}@github.com': # Put your Personal access token
    

    Link on how to create a personal access token: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

提交回复
热议问题