Skip to content

Instantly share code, notes, and snippets.

@KavenTheriault
Created March 20, 2019 19:03
Show Gist options
  • Save KavenTheriault/c8ab320a91d493da3614be6dfeba59f6 to your computer and use it in GitHub Desktop.
Save KavenTheriault/c8ab320a91d493da3614be6dfeba59f6 to your computer and use it in GitHub Desktop.
Create GitLab project deploy key

Create GitLab project deploy key

Generate key

cd ~/.ssh/
ssh-keygen -t ed25519 -C "project_name_deployment"
  • Input a file path to save your SSH key pair to. Example project_name_deployment_rsa
  • Enter a passphrase if you want. You can skip creating it by pressing Enter twice.
  • Backup the key somewhere safe and secure

Add key to gitlab projet

  1. Open project page https://gitlab.com/team_name/project_name
  2. Settings -> Repository
  3. Expand Deploy Keys section
  4. Copy the output of cat ~/.ssh/project_name_deployment_rsa.pub
  5. Use it in the Key field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment