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

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

  1. Copy the SSH key to your clipboard.

    If your SSH 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_rsa.pub
    # Copies the contents of the id_rsa.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. In the top right corner of any page, click . Settings icon in the user bar

  3. In the user settings sidebar, click SSH keys. SSH keys

  4. Click 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 key. The Add key button
  8. Confirm the action by entering your GitHub Enterprise password.
  1. Copy the SSH key to your clipboard.

    If your SSH 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_rsa.pub
    # Copies the contents of the id_rsa.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. In the top right corner of any page, click . Settings icon in the user bar

  3. In the user settings sidebar, click SSH keys. SSH keys

  4. Click 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 key. The Add key button
  8. Confirm the action by entering your GitHub Enterprise password.
  1. Copy the SSH key to your clipboard.

    If your SSH 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 -sel clip < ~/.ssh/id_rsa.pub
    # Copies the contents of the id_rsa.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. In the top right corner of any page, click . Settings icon in the user bar

  3. In the user settings sidebar, click SSH keys. SSH keys

  4. Click 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 key. The Add key button
  8. Confirm the action by entering your GitHub Enterprise password.