Setting up local development for Github
Set up configuration and SSH Keys
Published: June 19, 2021
Updated: August 10, 2023
In this note, we will walkthrough the steps to get started with local development with Github. First we will setup the configuration details, then we will set up the SSH keys.
To set up global variables, open the terminal and run the following:
Email set up:
git config --global user.email "insert your email here"
User name set up:
git config --global user.name "insert your name here"
To set up local variables for an individual project,
Open the terminal
Navigate to the project folder
To set the project email, run:
git config --local user.email "insert your email here"
To set the project user name, run:
git config --local user.name "insert your name here"
To view all settings, run:
git config --list
Setting up SSH keys
Generate the SSH keys
- Open the terminal
- Navigate to the home directory by running:
- Generate your SSH key by running:
ssh-keygen -t rsa
- Follow the prompts and accept the defaults. You can decide whether to create a passphrase, which is requested every time you want to interact with Github (like a password).
- When you are done, two files will be created
~/.ssh/id_rsa.pub(this is the public key)
- To copy your public key to your clipboard, run:
pbcopy < ~/.ssh/id_rsa.pub
Upload public key to Github
- Open your browser
- Login to Github and navigate to https://github.com/settings/profile
- Click on the SSH and GPG keys section on the sidebar
- Click on the New SSH key button
- Enter an appropriate title
- Paste the contents from your clipboard
- Click the Add SSH key button to save it
You are now set up, and can clone a repository.
Are you ready to work with me?
I'm actively open to new opportunities and requests.
If you have a question, or just want to say hi, I'll try my best to get back to you.