Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Yeah you have to use ssh if you enable 2fa. the other option is using the account key you can find in the settings for the password but that's just as bad as not having 2fa enabled
-
Kimmax109878yThink about it. Easy to come up with:
You're either using SSH or HTTPS.
We know it's not SSH because you would be using a key file then.
So it has to be HTTPS. How does github add auth to http, which is compatible with every standard git client out there? Use the built-in HTTPBasicAuth. Does BasicAuth support 2FA, or at least two passwords? Nope.
So could your approach work? Nope.
Kudos for trying to switch to 2FA tho!
Now do the right thing and setup the SSH Key access and keep 2FA up :) -
If you have 2fs then you need to create a personal token in your settings and use that as your pass
-
If you use https you need to create a personal access token. Give it all rights you can, name it something like "cli token" and copy it. Now instead of entering your password on the cli enter the token. You now have the rights to push again to your repos.
Related Rants
So I was like "imma be smart with my internet security and put 2 factor on my GitHub" only to find out I'm getting authenticating errors on trying to push. Disabling 2FA makes it work again.
GitHub y u do dis D:
undefined
github
security
2fa