Skip to content

Instantly share code, notes, and snippets.

@letiesperon
Last active January 16, 2026 00:12
Show Gist options
  • Select an option

  • Save letiesperon/ce8217bc99195032f9dda3c67b424150 to your computer and use it in GitHub Desktop.

Select an option

Save letiesperon/ce8217bc99195032f9dda3c67b424150 to your computer and use it in GitHub Desktop.
Configure git and github

How to link git to your github account in a new Mac OS

Generate new ssh key for my github email without passphrase:

ssh-keygen -t ed25519 -C "my@email.com"
eval "$(ssh-agent -s)"
echo -e "Host github.com\n  HostName github.com\n  IdentityFile ~/.ssh/id_ed25519\n  IdentitiesOnly yes" >> ~/.ssh/config
ssh-add -K ~/.ssh/id_ed25519

Add it to my github keys:

gh ssh-key add ~/.ssh/id_ed25519.pub

Verify GitHub is authenticated (otherwise troubleshoot here):

ssh -T git@github.com
# Hi __username__! You've successfully authenticated, but GitHub does not provide shell access.

Reference: Generate ssh key and Adding the new ssh key to github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment