Perfect, here's your setup with your exact details filled in:
ssh-keygen -t ed25519 -C "roopkt@gmail.com"- Press Enter to accept the default location (
~/.ssh/id_ed25519) - Set a passphrase (recommended) or press Enter to skip
Creates two files:
| File | What it is | Share it? |
|---|---|---|
~/.ssh/id_ed25519 |
Private key | ❌ NEVER share |
~/.ssh/id_ed25519.pub |
Public key | ✅ Upload to GitHub |
eval "$(ssh-agent -s)"
ssh-add --apple-use-keychain ~/.ssh/id_ed25519(On Linux, just use ssh-add ~/.ssh/id_ed25519)
pbcopy < ~/.ssh/id_ed25519.pubIt looks like: ssh-ed25519 AAAAC3Nza... roopkt@gmail.com
- Go to https://github.com/settings/keys (make sure you're logged in as rupeshtiwari)
- Click "New SSH key"
- Fill in:
- Title:
MacBook - Rupesh - Key type: Authentication Key
- Key: paste (Cmd+V)
- Title:
- Click "Add SSH key"
ssh -T git@github.comType yes to confirm the fingerprint the first time. Success:
Hi rupeshtiwari! You've successfully authenticated, but GitHub does not provide shell access.
Seeing your username rupeshtiwari there confirms it worked.
Clone your Pluralsight repo over SSH:
git clone git@github.com:rupeshtiwari/pluralsight-designing-data-systems-llms.gitSwitch an existing HTTPS repo to SSH:
git remote set-url origin git@github.com:rupeshtiwari/<repo-name>.gitVerify it switched:
git remote -vHere's your ~/.ssh/config setup so your personal GitHub key stays cleanly separated from any work keys.
touch ~/.ssh/config
chmod 600 ~/.ssh/config
open -e ~/.ssh/config # opens in TextEdit; or use: nano ~/.ssh/config# ---- Personal GitHub (rupeshtiwari / roopkt@gmail.com) ----
Host github-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
AddKeysToAgent yes
UseKeychain yesIf you ever add a work key later, you'd drop in a second block with its own alias and IdentityFile, so the two never clash:
# ---- Work GitHub (example, add only if needed) ----
Host github-work
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_work
IdentitiesOnly yesIdentitiesOnly yes is the important line: it forces SSH to use only the key you named for that host, instead of throwing every key in your agent at GitHub (which causes the "too many authentication failures" error).
Because the host alias is github-personal, your clone/remote URLs use that instead of github.com:
# Clone
git clone git@github-personal:rupeshtiwari/pluralsight-designing-data-systems-llms.git
# Switch an existing repo to use the personal alias
git remote set-url origin git@github-personal:rupeshtiwari/<repo-name>.gitTest it:
ssh -T git@github-personalSuccess:
Hi rupeshtiwari! You've successfully authenticated, but GitHub does not provide shell access.
So commits attribute to your personal account, set this per repo (not global, since you're on the Amazon machine):
cd <your-repo>
git config user.name "rupeshtiwari"
git config user.email "roopkt@gmail.com"Verify:
git config user.email # should print roopkt@gmail.comHost github-personalis just a nickname. When you typegit@github-personal:..., SSH looks up that block, connects to the realgithub.com, and uses only your personal key.- Add a second
Hostblock per additional account. The alias in the URL is what picks the key. No clashing, no wrong-account commits.
That's the whole thing. Once you clone with the github-personal alias, git push / git pull just work with no password.
Here's the one-liner to confirm exactly which key GitHub is accepting:
ssh -vT git@github-personal 2>&1 | grep -E "Offering|Server accepts|Authenticated|Hi "Run it and you'll see output like:
debug1: Offering public key: /Users/rupeshti/.ssh/id_ed25519 ED25519 SHA256:xxxx...
debug1: Server accepts key: /Users/rupeshti/.ssh/id_ed25519 ED25519 SHA256:xxxx...
Authenticated to github.com
Hi rupeshtiwari! You've successfully authenticated...
How to read it:
Offering public key:→ the key your machine triedServer accepts key:→ the key GitHub actually accepted (this is the one in use)Hi rupeshtiwari!→ confirms it mapped to your personal account
See every key your agent is throwing at GitHub (diagnoses "too many authentication failures"):
ssh-add -lFull verbose trace if a push ever gets rejected:
GIT_SSH_COMMAND="ssh -v" git push 2>&1 | grep -E "Offering|accepts|denied"Confirm a repo is using the right alias + identity:
git remote -v && git config user.emailRemote should show git@github-personal:... and email should be roopkt@gmail.com.
That's your complete SSH setup: key generated, agent configured, ~/.ssh/config with isolated personal host, commit identity set, and now a verification one-liner. Once Server accepts key shows your id_ed25519, you're fully wired — git push/pull will work passwordless with no account clashing.