Using SSH Keys with Git & Git Providers¶
Prerequisites¶
Assumptions & Prerequisites
This guide assumes you are using one of the following operating systems:
- macOS: Monterey (12) or newer. These versions use
zshas the default shell.- Windows: Windows 10 (build 1809) or newer versions.
- Linux: A distribution that uses
bash.
On all of these systems, this guide assumes you have Git installed and configured. If you have not done so, please refer to the Git Installation Guide.
This guide also assumes that you will be using OpenSSH. OpenSSH comes installed on Windows 11, macOS, and most Linux distributions.
If you are using Windows 10, follow this guide to install OpenSSH on Windows 10.
Check whether your system qualifies on macOS or Linux by running the following command in your terminal:
ps -o comm= -p $$
If the output is zsh, then you are using a macOS system that qualifies for this guide. If the output is bin/bash, then you are using a Linux system that qualifies for this guide.
Introduction¶
This guide will walk you through the process of using SSH keys with Git and Git providers. SSH keys provide a secure way to authenticate with Git providers.
Step 1: Check for Existing SSH Keys or Generate a New One¶
The first step is to:
- Check for existing SSH keys on your system.
- If you don't have any, you will need to generate a new SSH key.