Git
Git Tutorial for Beginners with Examples
Install Git
Add Local Project to Remote Git Repository
How to Clone a Project from a Remote Git Repository
Create a New Branch in Git
Switching Branches in Git
How to Push Code from Local to Remote Repository
Pushing a New Local Branch to a Remote Git Repository
Deleting a Git Branch Both Locally and Remotely
Restoring a Deleted Git Branch
Switching to a Different Branch Without Committing Changes in Local Git Repository
Git Stash Revert: How to Restore Stashed Changes in Git
Creating a Git Pull Request
Cancel a Git Pull Request
Tags in Git
Git Commands for Beginners
Generating a Personal Access Token on GitHub
Update the Local Branch with the Latest Code Changes from the Remote Branch
Compare Two different Git Branches in Visual Studio Code
Generating a Personal Access Token on GitHub
- Last updated Apr 25, 2024
GitHub removed password authentication on August 13, 2021. As a result, you'll need to use a personal access token for GitHub operations. This tutorial will guide you through generating a personal access token and using it in place of your password on GitHub.
Follow these steps to generate a personal access token:
- Open your web browser and go to GitHub at https://github.com. Log in to your account if you're not already logged in.
- Click on your profile picture in the top-right corner of the GitHub page. From the dropdown menu, select 'Settings'.
- Click on 'Developer settings' in the left sidebar of the Settings page.
- On the Developer settings page, click on 'Personal access tokens'.
- From the dropdown menu, select 'Tokens(classic)'.
- Under the Personal access tokens (classic), Click on 'Generate a personal access token'.
- Enter your password if you are prompted to log in.
- Enter a descriptive name in the 'Note' field to help you remember the purpose of this token.
- Scroll down to the 'Select scopes' section. Scopes define what permissions the token will have. Choose the scopes based on the actions you intend to perform using the token. Be cautious and only select the permissions you truly need.
- After selecting appropriate scopes, click the "Generate token" button at the bottom of the page.
- Next, when the token is generated, make sure to copy it to a safe place, as you won't be able to see it again.
Keep your token safe, similar to a password. Avoid sharing it openly or using it for public repository commits. If you suspect someone might have gained access to your token, you can come here and revoke it.