Use a PEM file to pull or push

You can use your server .pem file instead of creating a new key pair.

  • Get your .pem public key, by running the following command:

      $ ssh-keygen -y -f KEYFILE
  • Add this key to Gitlab using the application API.

  • Edit (or create if not exists) ~/.ssh/config and add the following lines, replacing SERVER-IP with the IP address or domain name of the GitLab server if necessary and KEYFILE with the full path to the .pem file.

      Host SERVER-IP
      IdentityFile KEYFILE
Last modification April 8, 2020