This tutorial shows you how to push code to GitHub using a custom SSH key and SSH config setup. It is ideal for beginners who want to manage multiple GitHub accounts or fix HTTPS 403 errors.
What You’ll Learn:
↳ How to generate an SSH key
↳ Add it to your GitHub account
↳ Configure ~/.ssh/config for identity management
↳ Create a GitHub repo and push code securely
Key Commands:
↳ ssh-keygen -t ed25519 -C "[email protected]" -f ~/.ssh/b2m2025_key
↳ cat ~/.ssh/b2m2025_key.pub
SSH config example:
Host github.com-b2m
HostName github.com
User git
IdentityFile ~/.ssh/b2m2025_key
IdentitiesOnly yes
Push to GitHub:
↳ "git push ...."
Benefits:
↳ No more HTTPS password/token prompts
↳ Cleanly separate work and personal GitHub accounts
↳ Easier collaboration in DevOps projects
Helpful Links:
↳ SSH Guide: https://docs.github.com/en/authentica...
↳ Create Repo: https://github.com/new
↳ Add SSH Key: https://github.com/settings/keys
Subscribe for more DevOps and Git walkthroughs.
#github #SSH #DevOps #T2S #Beginner2Master #GitTutorial