https://www.theserverside.com/blog/Coffee-Talk-Java-News-Stories-and-Opinions/How-to-create-a-GitHub-Personal-Access-Token-example
If you ask me, GitHub’s removal of support for password authentication on August 13, 2021 was a bit of an overstep. But fortunately, it’s not overly difficult to create and use a GitHub personal access token instead.
Just generate the personal access token in GitHub, and provide the token whenever Git prompts for your password.

The link to create a GitHub Personal Access Token is found under ‘Developer Settings’ in the admin console.
To create a personal access token in GitHub, follow these steps:

If you try to push to GitHub, you are told you need a personal access token.
The GitHub personal access token replaces your password. Any operation like a Git push that requires credentials prompts you for your username and password.
For the username, simply provide your GitHub account name.
For the password, provide your GitHub personal access token.
The first time you perform a push to GitHub, you are prompted for your username and password. Simply provide your GitHub username and the access token and your files are uploaded to GitHub.
| Git, GitHub & GitHub Copilot Certification Made Easy |
|---|
|
Want to get certified on the most popular AI, ML & DevOps technologies of the day? These five resources will help you get GitHub certified in a hurry.
Get certified in the latest AI, ML and DevOps technologies. Advance your career today. |

Use your GitHub personal access token as your password when you perform a git push to GitHub operation.
If you use Windows, your old credentials may be stored in the Windows Credentials Manager. Open this service, look for the web credential used by Git and delete it. Then perform a new push to GitHub.
The next time you perform a push with a GitHub personal access token, the new token will be stored by Windows. You won’t need to remember the value of the GitHub token on future Git push operations.
Cameron McKenzie is an AWS Certified AI Practitioner, Machine Learning Engineer, Solutions Architect and author of many popular books in the software development and Cloud Computing space. His growing YouTube channel training devs in Java, Spring, AI and ML has well over 30,000 subscribers.
24 Aug 2025