DEV Community

Heidi Fryzell
Heidi Fryzell

Posted on

Change GitHub Repo origin from https to SSH - Day 3

Yesterday I set up Git and GitHub on my PC to work on my dev-playground project.

I was connecting to the remote origin with https.

I soon found out that every time I wanted to push to GitHub I had to enter my personal access token. Yikes!

A better way is to use SSH.

  1. Check for existing SSH Keys on your computer
  2. Generate a new SSH key and add it to the SSH agent
  3. Add the new SSH key to your GitHub Account
  4. Change GitHub url from https to SSH

🤦‍♀️ Ah-ha Moment

If you use the SSH agent you don't have to enter a passphrase every time you connect with GitHub. I need to do this on my Mac! I have been wasting a lot of time entering that passphrase... 😳

Top comments (0)