Set GitHub SSH Key For Password-free Push
I need to do this on every new machine. So I keep a note for my quick reference.
Here are the links for the detailed configurations and so on.
$ ssh-keygen -t ed25519 -C "email@example.com"
You will be asked about the secure passphrase. I prefer letting it empty. Otherwise you need to enter this password every time you
$ eval "$(ssh-agent -s)": Test whether the SSH agent work or not.
$ ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub: copy the output of this command
- Go to the GitHub personal setting -> “SSH and GPG keys” on the left panel -> “New SSH key” -> Paste the above output to the input.
ssh -T firstname.lastname@example.org.
1 2 3 4 5
The authenticity of host 'github.com (18.104.22.168)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,22.214.171.124' (RSA) to the list of known hosts. Hi <your_username>! You've successfully authenticated, but GitHub does not provide shell access.
Change the Local Repo’s Remote Address
Assume your project is
awesome-project, then edit
url = https://<your_github_username>@github.com/<your_github_username>/awesome-project.git
url = email@example.com:<your_github_username>/awesome-project.git
Now you don’t need to enter password again when
git push or
- ← Older-Install Vim on Raspberry Pi with Python3 Support
- Introducing DG002JX - A Power Management Module-Newer →