
How to Set Up GitHub Locally
This guide walks you through the complete process of setting up GitHub on your local machine—from installing Git, configuring your user info, generating SSH keys, to cloning repositories and pushing your first commit. Whether you’re a developer just starting out or someone looking to streamline your workflow, this post covers all the essential steps to get you up and running with GitHub locally.
1. Make Sure You Gave Git Installed
git --version
It should look something like
git version 2.x.x
If not, install by doing
apt install git
2. Set Up Your Git User Info
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Make sure the email you enter match the one you use on GitHub
3. Generate an SSH Key
ssh-keygen -t ed25519 -C "you@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
cat ~/.ssh/id_ed25519.pub
Copy the output
4. Add SSH Key on GitHub
Go to GitHub > Settings > SSH and GPG keys and press on ‘New SSH key’
Add a title, paste what you copied before into the key area, and press ‘Add SSH key’ when you’re done
5. (Optional) Test If You are Connected to GitHub
ssh -T git@github.com
It should say something along the lines of
- Hi username! You’ve successfully authenticated, …
6. Try Cloning a Repo
git clone git@github.com:yourusername/your-repo.git
Congrats!! You have succesfully setup GitHub locally on your machine
// Miyarima