Skip to main content

SSH Configuration and Repository Access Guide

Setting Up SSH for GitLab

To ensure secure access to our private GitLab repositories, we utilize SSH keys. This guide walks you through generating an SSH key, adding it to GitLab, and configuring your SSH client to use a specific domain alias for our GitLab repositories.

Generating a New SSH Key

  1. Open your terminal.

  2. Run the following command, substituting <your_email@codewave.com> with your email address associated with your GitLab account:

    ssh-keygen -t ed25519 -C "<your_email@codewave.com>"
  3. When prompted to "Enter a file in which to save the key," press Enter to accept the default location.

  4. At the prompt, enter a secure passphrase.

Adding Your SSH Key to GitLab

  1. Copy your SSH public key to the clipboard. If you used the default save location, you can run:

    cat ~/.ssh/id_ed25519.pub | pbcopy

    For Windows, use clip instead of pbcopy.

  2. Go to GitLab and sign in.

  3. Navigate to User Settings > SSH Keys.

  4. Paste your SSH key into the "Key" field.

  5. Click Add key.

Configuring SSH for "gitlab.com-codewave"

To streamline access and differentiate our GitLab domain, we'll use the alias "gitlab.com-codewave" in our SSH configuration.

  1. Open or create your SSH config file:

    nano ~/.ssh/config
  2. Add the following configuration, which sets up "gitlab.com-codewave" as an alias for GitLab's SSH access:

    Host gitlab.com-codewave
    HostName gitlab.com
    User git
    IdentityFile ~/.ssh/id_ed25519
    IdentitiesOnly yes
  3. Save and exit the editor.

Troubleshooting

If you encounter any issues with fetching the dependencies:

  • Ensure your SSH setup is correctly configured as per the earlier sections.
  • Verify that you have access to the repositories.

For further assistance, don't hesitate to reach out to the development team or consult the GitLab documentation on managing dependencies with SSH URLs.