Content

  • GitLab SSH Keys Setup
  • Clone a GitLab Repository Using SSH

GitLab SSH Keys Setup

  1. Enter the following using GitBash:

    • ssh-keygen -t ed25519 -C "acetiercel@yahoo.com"
  2. Copy the public key to clipboard.

    • cat ~/.ssh/id_ed25519.pub | clip
  3. Paste the public key in your GitLab account.

    • Go to Profile → Settings → SSH Keys
    • Enter the public key and Save
  4. Test that SSH keys are setup correctly. (replacing gitlab.com with your GitLab’s instance domain):

    • ssh -T git@gitlab.com

Clone a GitLab Repository Using SSH

  1. Get access permissions to a GitLab repository. You’ll have access permissions if you are a member.
  2. Clone the repository:
    git clone git@gitlab.com:madbarua/externals.git
  3. Succeeding git operations on this ssh-cloned repository won’t require user/name passwords.

References

  • Git
  • 1 - ssh keys for gitlab