User access to GH repo with ssh key - blitterated/docker-dev-env GitHub Wiki

Generate an ssh key for github

ssh-keygen -t ed25519 -C "[email protected]"

Add an entry to ~/.ssh/config

Host ghblit
  ForwardAgent yes
  Hostname github.com
  User git
  IdentityFile <path_to_ssh_files>/id_ed25519

Test connection

Be sure you've added the public key to github first

ssh -T git@ghblit

Add the remote

git remote add origin git@ghblit:blitterated/docker_dev_env.git

Push commits for first time

git push -u origin master