Skip to content

SSH keys

SSH / Git setup

To push and pull code from Drupal.org's git repositories, you'll need ssh keys to be added to your account.

See:

Quick start (TL/DR)

Generate a new ssh keypair

To generate a new ssh keypair, run the following on your command line.

ssh-keygen -t ed25519

You will see something like:

Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/user/.ssh/id_ed25519):

Decide if you are going to specify a passphrase or not and respond accordingly.

Enter passphrase (empty for no passphrase):
Enter same passphrase again:

Add your public ssh key to Drupal.org

Screenshot of the layout of the button to "Add new key"

  • Copy the contents of your ~/.ssh/id_ed25519.pub file into the 'key' field.
  • Optionally remove expiration date.
  • Click "Add key"

Test your key

Test that you can authenticate against drupal.org with:

ssh -T git@git.drupal.org

Or if you saved your key somewhere other than the default location, you can specify the identity file with:

ssh -T git@git.drupal.org -i ~/.ssh/id_ed25519

You should get a success message, for example:

Welcome to GitLab, @ecofinn!