Git Clone from GitHub over https with two-factor authentication -


i began using two-factor authentication on github, , unable use git on https on private repos in usual way:

peter@computer:~$ git clone https://github.com/[...]/myprivaterepo cloning 'myprivaterepo'... username 'https://github.com': [...] password 'https://[...]@github.com':  remote: invalid username or password. fatal: authentication failed 'https://github.com/[...]/myprivaterepo/' 

if disable two-factor authentication can use before:

peter@computer:~$ git clone https://github.com/[...]/myprivaterepo cloning 'myprivaterepo'... username 'https://github.com': [...] password 'https://[...]@github.com':  remote: counting objects: 147, done. remote: total 147 (delta 0), reused 0 (delta 0), pack-reused 147 receiving objects: 100% (147/147), 22.70 kib | 0 bytes/s, done. resolving deltas: 100% (87/87), done. checking connectivity... done. 

i know can use ssh , works, there way can keep two-factor authentication while still being able use github on https, example sending auth token request?

find out how fix here:

https://github.com/blog/1614-two-factor-authentication#how-does-it-work-for-command-line-git

how work command-line git?

if using ssh git authentication, rest easy: don't need anything. if using https git, instead of entering password, enter personal access token. these can created going personal access tokens page.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -