The New Github Authentication Token Process

Raphael Sani Enejo (SanRaph)
5 min readAug 14, 2021

Intro

Isn’t it awkward when something is normal and the next minute, everything changes? I was at work coding and committing as usual however when I wanted to clone again later that evening just about closing time to try and wrap things up for the day, I was greeted with a 403 error code from Github in my terminal

The 403 error code

Annoying right? I agree with you, it was confusing considering how sure I was about my password, It annoyingly didn’t let me in. Do you remember that saying don't fix it if it’s not broken? yea, that’s exactly my mantra, well, the world of tech is dynamic I know but a change has to be necessary. I couldn’t figure it out that evening since I wasn’t aware of their warning emails and waited till the next morning to get it fixed, which I did and since I don’t want it frustrating you too as did me, I wrote this article to help.

I’ll be taking you through the process which they have been announcing, I still consider it annoying giving the amount of time it requires to set up no matter how small so strap in for a cool ride in this wagon.

The Process

The Github team has been saying that by August 13, this year they will be changing to a token authentication and the password authentication will no longer be accepted, don’t quote me on this, quote them because by now you must have received a Deprecation email like this one below, for reasons I can’t tell but hang in there, I know they mean well.

The deprecation email

If you trail this email, it will lead you to Token authentication requirements for the GitHub operations page detailing everything you need to know.

Requirements page

As a side note, you don't need this email to begin the process, it is just an announcement including the how-to resources to help you, so don't go sifting through your emails looking for a GitHub Deprecation Notice email.

Let’s start

All you need to do is log in to your GitHub account, go to your avatar or profile picture, click on the dropdown icon next to your picture, and select Settings as shown below

Go to your profile page, beside your image, click the dropdown icon and you will see Settings

Then go to Developer Settings on the left-hand sidebar, in the dropdown list, and click on it.

Click on Developer settings

From here click Personal access tokens the last in the box by the left

Click on Personal access tokens

and go to Generate new token at the top right corner

This is what you see clicking Personal access tokens

It will prompt your GitHub password when you click on Generate token button, provide the password, and hit confirm password button like so

Enter your Github account password and hit Confirm password button

It will return a New Personal access token page, input in the Note field what the token is used for, don’t overthink this, it is just asking for your token’s descriptive name, it can be anything like MyAugustToken or something.

In the Select scope section of the page, for basic GitHub operations like push and pull from remote repositories, checkmark repo, and delete_repo scope, when you are sure of the two checkmarks in the blue boxes, hit the Generate token button at the bottom of the page

Enter the token description and check the two boxes

It will provide you a token, which is a long string of characters that appear in between a green checkmark and a clipboard sign. Copy this token and paste it somewhere for storage, a place you will always refer back to, as clearly indicated on top of the page, since you will be needing it when pushing files to your repository, if you lose it, bye-bye to it forever and you wouldn’t want that, do it before leaving the page, have you? good! and that’s it, you are good to go and I hope the process was smooth for you.

Finally, when you are back to the command line or terminal doing your GitHub operations that require authentication, it will return the normal prompt for username and password, enter your username as usual but then when it comes to the password part, copy your token from where you saved it as I told you to, and paste it in place of your password and that’s it, you are in again.

Conclusion
I definitely don’t like platforms that alter things overnight and I know you feel the same way or not, my bad! in this case, it’s not overnight but you know what I mean, especially things that require series of steps to set up, which you have to deal with before getting back to the day’s hectic schedule, yet I understand that most of the changes sometimes arise as a result of a genuine need for change, maybe in design or perhaps security issues or better still making life easier — innovation, with this, I say let’s give it up for the GitHub team for taking this awesome step as well as preparing our minds through those wonderful emails that I never considered till I was locked out haha! and also for providing simple guidelines so you can set up quickly and get back to writing life-changing code. Remember, you can always regenerate a new token following the same steps so, I was kidding when I said losing the token is a bye-bye, you can even set it to last forever but the Github Team thinks it’s unsafe and warns against it.

Whatever it is you can’t get right, let me know in the comments section and together we can figure out a solution until then, go get busy with saving lives through the code you right, Hasta la vista.

--

--

Raphael Sani Enejo (SanRaph)

A Software Engineer with a strong user focus. Extensive experience in developing robust code and building world-class applications and life-changing products.