Member-only story

How to switch from GitHub password authentication to personal access token

Tom Smykowski
5 min readSep 29, 2021

--

Some time ago, Github disabled authentication with login and password in favor of token based authentication. From this article, you will learn how to switch to the new authentication method.

CHEAT SHEET

Requirements: windows, ssh, git, git bash, GitHub private token file
Optional: adjust your setup, or commands to your setup
1. Rename GitHub private token file to
id_rsa_something
2. Place it inside:
C:\Users\YourUserName\.ssh\
3. Add this piece of config to C:\Users\YourUserName\.ssh\config file:Host github.com
User git
IdentityFile C:\Users\YourUserName\.ssh\id_rsa_yourorganisation_yourfolder
(between IdentityFile and the path there is a single space, not a new line)4. Start SSH agent by calling this command from Bash:eval "$(ssh-agent -s)"5. If you want to start it automatically, start ssh agent with Task Scheduler.

DETAILS

Message you will see when trying to do push to a remote GitHub repository with password authentication:

Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

You can switch your authentication method to personal access token on your live local repository.

--

--

Tom Smykowski
Tom Smykowski

Written by Tom Smykowski

🚀 Senior/Lead Frontend Engineer | Angular · Vue.js · React | Design Systems, UI/UX | Looking for a new project! 📩 contact@tomasz-smykowski.com

No responses yet