SSH Guidelines
This guide walks you through setting up SSH authentication for cloning and working with our GitHub repositories. Using SSH keys provides a more secure and convenient workflow compared to HTTPS—once configured, you won’t need to enter credentials for each Git operation.
Note: These instructions are written for macOS. Linux and Windows (WSL) users may need to adjust certain commands (see platform-specific notes where applicable).
Create and configure SSH Keys
-
First of all, check if you already have any existing keys:
ls -la ~/.ssh -
Open your terminal and run the following command (use the email address that has access to the project’s repository)
ssh-keygen -t ed25519 -C "your_email@example.com" -
The above will generate a new ssh key using the provided emails as a label, then we need to specify the location in which the files will be stored
/Users/youruser/.ssh/<name_of_the_key> -
For the name of your key, it is always recommended to use a meaningful one (so you can easily identify it if you have multiple SSH Keys on your machine). For example:
github_ovation_ed -
After that, you’ll be prompted to type a secure passphrase. Make sure you securely store it because you’ll need it after.
Configure SSH Profile and add it to the SSH Agent
-
Open your SSH Config file (or create it if you don’t have it already)
nano ~/.ssh/config -
Add the following to it (take the spaces into consideration)
Host github.com HostName github.com AddKeysToAgent yes UseKeychain yes IdentityFile ~/.ssh/<name_of_the_key>_edNote:
UseKeychain yesis macOS-specific. Linux users should omit this line. -
Add your SSH private key to the SSH agent and store your passphrase in the keychain
ssh-add --apple-use-keychain ~/.ssh/<name_of_the_key>_ed
Verify Your SSH Connection
Test that your SSH key is properly configured:
ssh -T -i ~/.ssh/<name_of_the_key> git@github.com
Tip: The
-iflag specifies which key to test. This is useful if you have multiple GitHub accounts with different keys.
You should see a message like:
Hi username! You’ve successfully authenticated, but GitHub does not provide shell access.
Add SSH Key to Github and clone the repo
Once you have been granted the required access to the project’s repo, follow these instructions to add the previously configured key to your Github Profile.
After that, clone the repo (using SSH) into your local machine:
git clone git@github.com:ovationventures/<repository_name>.git
Once cloned, go to the project’s root folder and run the following
git config user.name "Your Name"
git config user.email "Your Email (the one you used for the SSH configuration)"
Alternative: Quick Clone with Inline SSH Configuration
If you prefer to skip the SSH config file setup (or need to use a specific key for this repo only), you can clone and configure in one go:
git -c core.sshCommand='ssh -i ~/.ssh/<name_of_the_key>_ed -o IdentitiesOnly=yes' clone git@github.com:ovationventures/<repository_name>.git
cd <repository_name>
git config core.sshCommand 'ssh -i ~/.ssh/<name_of_the_key>_ed -o IdentitiesOnly=yes'
git config user.name "Your Name"
git config user.email "your_email@example.com"
Note: The
IdentitiesOnly=yesflag ensures Git uses only the specified key and doesn’t try others from your SSH agent.
Managing Multiple GitHub Accounts
If you have multiple GitHub accounts (e.g., work and personal), you can configure distinct SSH host aliases to manage them cleanly.
Configure host aliases
In your ~/.ssh/config, create separate entries for each account:
Host github-ovation
HostName github.com
User git
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/github_ovation_ed
IdentitiesOnly yes
Host github-personal
HostName github.com
User git
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/github_personal_ed
IdentitiesOnly yes
Note:
UseKeychain yesis macOS-specific. Linux users should omit this line.
Test each account
ssh -T github-ovation # Tests Ovation key
ssh -T github-personal # Tests personal key
Clone using the alias
When cloning Ovation repositories, use the alias instead of github.com:
git clone github-ovation:ovationventures/<repository_name>.git
This ensures Git always uses the correct key for each organization without ambiguity.