Frecuentemente publicamos actualizaciones de nuestra documentación. Es posible que la traducción de esta página esté en curso. Para conocer la información más actual, visita la documentación en inglés. Si existe un problema con las traducciones en esta página, por favor infórmanos.
GitHub AE is currently under limited release. Please contact our Sales Team to find out more.

Adding a new SSH key to your GitHub account

To configure your GitHub Enterprise account to use your new (or existing) SSH key, you'll also need to add it to your GitHub Enterprise account.

Before adding a new SSH key to your GitHub Enterprise account, you should have:

After adding a new SSH key to your GitHub Enterprise account, you can reconfigure any local repositories to use SSH. For more information, see "Switching remote URLs from HTTPS to SSH."

Nota: Las llaves DSA de se obsoletizaron en OpenSSH 7.0. Si tu sistema operativo utiliza OpenSSH, deberas utilizar una tipo de llave alterno cuando configures SSH, tal como una llave RSA. Por ejemplo, si tu sistema operativo es macOS Sierra, puedes configurar SSH utilizando una llave RSA.

  1. Copy the SSH public key to your clipboard.

    If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.

    $ pbcopy < ~/.ssh/id_ed25519.pub
    # Copies the contents of the id_ed25519.pub file to your clipboard

    Tip: If pbcopy isn't working, you can locate the hidden .ssh folder, open the file in your favorite text editor, and copy it to your clipboard.

  2. En la esquina superior derecha de cualquier página, da clic en tu foto de perfil y después da clic en Configuración.

    Icono Settings (Parámetros) en la barra de usuario

  3. En la barra lateral de configuración de usuario, da clic en Llaves SSH y GPG.

    Llaves de autenticación

  4. Click New SSH key or Add SSH key.

    SSH Key button

  5. In the "Title" field, add a descriptive label for the new key. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air".

  6. Paste your key into the "Key" field.

    The key field

  7. Click Add SSH key.

    The Add key button

  8. Si se te solicita, confirma tu contraseña GitHub Enterprise.

    Diálogo Modo sudo

  1. Copy the SSH public key to your clipboard.

    If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.

    $ clip < ~/.ssh/id_ed25519.pub
    # Copies the contents of the id_ed25519.pub file to your clipboard

    Tip: If clip isn't working, you can locate the hidden .ssh folder, open the file in your favorite text editor, and copy it to your clipboard.

  2. En la esquina superior derecha de cualquier página, da clic en tu foto de perfil y después da clic en Configuración.

    Icono Settings (Parámetros) en la barra de usuario

  3. En la barra lateral de configuración de usuario, da clic en Llaves SSH y GPG.

    Llaves de autenticación

  4. Click New SSH key or Add SSH key.

    SSH Key button

  5. In the "Title" field, add a descriptive label for the new key. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air".

  6. Paste your key into the "Key" field.

    The key field

  7. Click Add SSH key.

    The Add key button

  8. If prompted, confirm your GitHub Enterprise password.

    Sudo mode dialog

  1. Copy the SSH public key to your clipboard.

    If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.

    $ sudo apt-get install xclip
    # Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`)
    
    $ xclip -selection clipboard < ~/.ssh/id_ed25519.pub
    # Copies the contents of the id_ed25519.pub file to your clipboard

    Tip: If xclip isn't working, you can locate the hidden .ssh folder, open the file in your favorite text editor, and copy it to your clipboard.

  2. En la esquina superior derecha de cualquier página, da clic en tu foto de perfil y después da clic en Configuración.

    Icono Settings (Parámetros) en la barra de usuario

  3. En la barra lateral de configuración de usuario, da clic en Llaves SSH y GPG.

    Llaves de autenticación

  4. Click New SSH key or Add SSH key.

    SSH Key button

  5. In the "Title" field, add a descriptive label for the new key. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air".

  6. Paste your key into the "Key" field.

    The key field

  7. Click Add SSH key.

    The Add key button

  8. If prompted, confirm your GitHub Enterprise password.

    Sudo mode dialog

¿Te ayudó este documento?

Privacy policy

Help us make these docs great!

All GitHub docs are open source. See something that's wrong or unclear? Submit a pull request.

Make a contribution

O, learn how to contribute.