Push problem with console (maybe 2fa) #22175
-
Im new with git, i dont know if it matthers, but im in new in linux also. How i push until yesterday, i go my console, git push, put my Username and Password, and its done. no issue here. I did the Two-factor authentication (i have the 16 lines code), so now i want to push from console like i use to, but… The question its how push to my repository now ?? (i dont want use visual studio code). |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
You need to create a PAT (personal access token) and use that instead of the password. You’ll need the Or alternatively you can use SSH instead of HTTPS. |
Beta Was this translation helpful? Give feedback.
-
thanks airtower-luna. The PAT thing works. Maybe i need to make another question, but i give it a shot here… I try this and this using the token as a password |
Beta Was this translation helpful? Give feedback.
-
The I can’t say much about the git credential helpers, I just use SSH. But in general I strongly advise against storing the token unencrypted. The best option is to use a password manager that stores your passwords in an encrypted database (I like KeePassXC), so you have to remember only one password, and of course keep the database backed up. The |
Beta Was this translation helpful? Give feedback.
-
And I´m goingo to start using KeePassXC… It seems a good “solution”. Thanks for share information, i also delete the user.* staffs |
Beta Was this translation helpful? Give feedback.
-
Don’t delete all the |
Beta Was this translation helpful? Give feedback.
You need to create a PAT (personal access token) and use that instead of the password. You’ll need the
repo
scope, and possiblyworkflow
if you use Github Actions (see Available scopes).Or alternatively you can use SSH instead of HTTPS.