3 Different Ways to Save SSH Keys in GitLab

Knowledge Drop

Last tested: Jan 21, 2019
 

There are three different ways you can store Looker generated SSH keys in GitLab: as a user SSH key, a repository deploy key, and a global shared deploy key.

User SSH Keys: This is the default way to save a key for GitLab. If the user follows the link on Looker when setting up their git connection it will have them save the SSH key as a User SSH Key. You can find these keys by clicking on your profile on the top right then Settings > SSH Keys.

Repository Deploy Keys: You can also save SSH keys as deploy keys in GitLab (this is the default method GitHub uses to save SSH keys). Deploy Keys save to the repository meaning if the user account gets deleted the key still exists. If using this method you must select Allow Write Access when adding the deploy key, or Looker will not be able to push your changes. You can find these keys by opening the repository then Settings > Repository > Deploy Keys.

Global Deploy Keys: This type of key is very similar to the Repository Deploy Keys with one major difference. Instead of using different deploy keys for each repository you create, Global Deploy Keys use one key to manage multiple repositories. You need to be an admin to use this key, and to become an admin you must be using a paid account.

A more in depth explanation can be found here: https://docs.gitlab.com/ee/ssh/#global-shared-deploy-keys

This content is subject to limited support.                

Version history
Last update:
‎05-07-2021 09:48 AM
Updated by: