2 - How To Create A Personal Access Token in GitHub
2 - How To Create A Personal Access Token in GitHub
Resolution
https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/
creating-a-personal-access-token
You should create a personal access token to use in place of a password with the command
line or with the API.
Creating a token
1. Verify your email address, if it hasn't been verified yet.
2. In the upper-right corner of any page, click your profile photo, then
click Settings.
7. To give your token an expiration, select the Expiration drop-down menu, then
click a default or use the calendar picker.
8. Select the scopes, or permissions, you'd like to grant this token. To use your
token to access repositories from the command line, select repo.
Click on all checked box
9. Click Generate token.
Warning: Treat your tokens like passwords and keep them secret. When working with the
API, use tokens as environment variables instead of hardcoding them into your programs.
For example, on the command line you would enter the following:
For example, on the command line you would enter the following:
Personal access tokens can only be used for HTTPS Git operations. If your repository uses an
SSH remote URL, you will need to switch the remote from SSH to HTTPS.
[engr_kkamal@myinstance-1 khi-dir]$ git push -u origin master
Username for 'https://github.com': kkamal123
Password for 'https://kkamal123@github.com': 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