How to use a PAT to access GitHub from the command line?

I just completed Set Up with Git and GitHub here:

Upon logging in via the command line according to the instructions, I got an email from GitHub that this mode of authentication is deprecated and will no longer work in a few months.

They now want you to use a personal authentication token, and there are links that show you how to generate one. I did this, but – and I feel dumb, but I also have no idea what I’m doing, which is why I’m here – I have no idea how to use this PAT to access my GitHub account from the command line.

Is there a Codeacademy guide for this, since the current method is deprecated? I did google it, but I’ve only found dead links.

d’oh. It’s in the GitHub Docs here, I just didn’t read far enough:

I actually tried this before posting this question and it didn’t work, but I assume there was some other issue as the pw authentication also failed a few times before it worked.

1 Like