Account access password deprivation, keys, clueless

So, I’ve been using github for some time.
No when I do a git push from a local repository I get a deprecation notice with links about how my password access is going away, with links to more info, etc.

Well, I have now read a bunch of those links and have no clue where I stand today or what I need to do to use the “new” way. :roll_eyes:

Is there a step by step guide: “Access github the new way for dummies; because the old way is terrible and you need to learn a whole bunch of security stuff and SSH and HTTPS and even more stuff to break every time you reinstall an OS or have to use another PC and loose your old key ring and…who knows what else.” :thinking:


The smallest change from using your password would be to create a personal access token (PAT) with the repo scope and use that instead of your password when pushing. Using a password manager to keep the token is a good idea.

1 Like

I already added a ssh key to my github account
(clearly it’s really secure…github sent me an email with the key in open text. I’m very confident this is better. :upside_down_face: )

In any case, now I have a local ssh key and it is registered with github.

Now in my local repository, in a terminal window “git push origin master” and it does nothing different. It asks for my email address and password, then proceeds to upload the file.

So, obviously I have not done something right. :thinking:

1 Like

The part you configure in the Github account (or anywhere else you want to log in to) is called a public key for a reason, look up Public-key cryptography some time. Just make sure the matching private key stays that way. :wink:

When switching from HTTPS to SSH you have to update the remote URL for the repository, using a git remote set-url command similar to this:

git remote set-url --push origin

You can find the URL on your repository site. That command changes only the push URL, to change the pull URL as well repeat without the --push option.

1 Like

did that, now enter “git push origin master”, same email/password prompt

Edit: didn’t actually change it to… once I did that it appears to work.

So, what do I need to do on my other PC now?


Also create an SSH key pair, and add the public key to your Github account, too.

1 Like

So, a key pair for every PC?

1 Like

Yes, exactly. Technically it’s also possible to copy keys over, but that’s generally more work, and also means you can’t revoke access for a specific system.

1 Like

Edit: tried again and it took the passphrase.

I probably typed it wrong before. Mark me embarrassed.

But, it did ask for a password, not pass phrase. :roll_eyes:

1 Like