How to Authenticate to GitHub Using Username and Password
When setting up a new editor and attempting the GitHub push workflow, you may encounter a dialog window prompting you to enter your GitHub username and password. However, if you have enabled two-factor authentication (2FA) on GitHub, you cannot simply use your regular credentials for login.
To authenticate to GitHub in this scenario, you need to create a personal access token that is associated with the specific app you are using and has the necessary permissions. Here’s how you can do it:
Go to your GitHub settings and locate the Developer Settings section.
Click on Personal access tokens.
Add a name to the token so that you can remember its purpose. Set the expiration to “No expiration” and enable the
repo
scope, as it is the only scope required.Save your changes, and the generated token will be displayed.
Enter this token as the password when prompted in the username/password dialog window.
With these steps completed, you should now be authenticated to GitHub and ready to proceed with your workflow.
tags: [“GitHub”, “authentication”, “personal access token”, “two-factor authentication”, “2FA”]