Set up SSH Key authentication for GitHub

Before you Link a local GitHub repository to GitHub or Clone a GitHub repository, it is strongly recommended to set up an SSH key to use for authentication.

When using Git repositories (for example, on GitHub) with the Projects feature, authentication is typically handled using SSH keys. SSH keys allow secure, passwordless communication between your local environment and the remote Git server, so you don’t need to enter a username or password each time you push or pull changes.

The setup process involves two main steps:

  1. Generate SSH keys on the machine running OL Connect Automate.

  2. Add the public key to your GitHub account or repository to authorize access.

About SSH keys

SSH authentication relies on a pair of cryptographic keys that work together to verify your identity securely:

  • Public key: Shared with the remote Git server, for example, added to your GitHub account. It allows the server to recognize and trust your local environment.

  • Private key: Stored securely on your local machine and must never be shared. It proves your identity by cryptographically signing authentication requests.

When you connect to a Git server, the server checks whether your public key is registered. It then issues a cryptographic challenge that only your private key can answer. If the response is valid, your identity is confirmed, and access is granted, all without transmitting a password.

Generate an SSH key

To create a new SSH key in OL Connect Automate:

  1. Navigate to Menu → Settings → Git config and go to the SSH Keys section.

  2. Click add key to create a new SSH key pair.

  3. Enter a Name for the key.

  4. Enter a Passphrase for the key. This is optional. A passphrase provides an additional layer of security by encrypting the private key. Even if someone gains access to the key file, they cannot use it without knowing the passphrase.

  5. Click Generate key to create the key pair.

OL Connect Automate window for adding an SSH Key, showing the fields to enter a name and passphrase, and generate key.

By default, the private and public key files are stored in:

C:\ProgramData\Objectif Lune\OL Connect Automate\projects\.sshkeys

Add public key to the repository

  1. Copy the public key in OL Connect Automate.

    • The key can be copied when it is created, or later.

    • To copy a public key later, navigate to Menu → Settings → Git config, scroll down to SSH Keys, and click on the key name for the public key you want to copy.

  2. Go to the repository on GitHub, and navigate to Settings → Deploy keys.

  3. Click Add deploy key.

  4. Enter a Title for the key, for example, Peter's OLCA VM.

  5. Paste the copied public key into the Key field.

  6. Enable Allow write access to permit pushing changes from OL Connect Automate.

  7. Click Add key.

GitHub window for entering the public key, with fields completed as per the text above.

  1. A verification code is sent to your GitHub account email address. When prompted, enter the verification code sent to you.

  2. Click Verify to confirm.