Skip to content

Instantly share code, notes, and snippets.

@pwittchen
Forked from uasghar-smile/instructions.md
Created December 25, 2024 11:54
Show Gist options
  • Select an option

  • Save pwittchen/22415cb610ccd6881ca9bf2186b68a01 to your computer and use it in GitHub Desktop.

Select an option

Save pwittchen/22415cb610ccd6881ca9bf2186b68a01 to your computer and use it in GitHub Desktop.

Revisions

  1. @DakotaLMartinez DakotaLMartinez revised this gist Aug 25, 2023. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions instructions.md
    Original file line number Diff line number Diff line change
    @@ -45,19 +45,19 @@ code ~/.ssh/id_rsa.pub

    Login to GitHub and go to [your ssh key settings](https://github.com/settings/keys)

    ![Click the Add SSH Key button](https://docs.github.com/assets/images/help/settings/ssh-add-ssh-key.png)
    ### Click the Add SSH key button

    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".

    ![SSH Key Paste](https://docs.github.com/assets/images/help/settings/ssh-key-paste.png)
    ### Paste in your SSH key

    Your key should be in the clipboard from before. Next you can click the button.

    ![SSH Add Key Button](https://docs.github.com/assets/images/help/settings/ssh-add-key.png)
    ### Click the Add SSH key button

    You may be asked to confirm your password at this point.

    ![Confirm Password Form](https://docs.github.com/assets/images/help/settings/sudo_mode_popup.png)
    ### Fill in the confirm password form and submit

    Finally, to test this out, you can run the following command again to test the SSH connection to GitHub:

  2. @DakotaLMartinez DakotaLMartinez revised this gist Jun 8, 2021. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions instructions.md
    Original file line number Diff line number Diff line change
    @@ -47,9 +47,8 @@ Login to GitHub and go to [your ssh key settings](https://github.com/settings/ke

    ![Click the Add SSH Key button](https://docs.github.com/assets/images/help/settings/ssh-add-ssh-key.png)

    - 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".
    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".

    -
    ![SSH Key Paste](https://docs.github.com/assets/images/help/settings/ssh-key-paste.png)

    Your key should be in the clipboard from before. Next you can click the button.
  3. @DakotaLMartinez DakotaLMartinez revised this gist Jun 8, 2021. 1 changed file with 12 additions and 0 deletions.
    12 changes: 12 additions & 0 deletions instructions.md
    Original file line number Diff line number Diff line change
    @@ -31,6 +31,18 @@ it to the clipboard with the following command:
    cat ~/.ssh/id_rsa.pub | pbcopy
    ```

    Note, on Linux, you'll want to use something like `xclip` instead of pbcopy:

    ```
    cat ~/.ssh/id_rsa.pub | xclip -sel clip
    ```

    Or if you'd rather not install anything, you can just open the file and select all and copy:

    ```
    code ~/.ssh/id_rsa.pub
    ```

    Login to GitHub and go to [your ssh key settings](https://github.com/settings/keys)

    ![Click the Add SSH Key button](https://docs.github.com/assets/images/help/settings/ssh-add-ssh-key.png)
  4. @DakotaLMartinez DakotaLMartinez created this gist Jun 8, 2021.
    63 changes: 63 additions & 0 deletions instructions.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,63 @@
    You need to do this if you try this command:

    ```bash
    ssh -T [email protected]
    ```
    and you get something that says

    ```bash
    [email protected]: Permission denied (public key).
    ```

    if you run

    ```bash
    cat ~/.ssh/id_rsa.pub
    ```

    If you don't see anything, then you can generate a new key with the following command.
    (Skip this step if you saw the key printed to the terminal already)

    ```bash
    ssh-keygen -t rsa -b 4096 -C "[email protected]"
    ```

    You'll get a few prompts here, you can confirm the default file location. If you don't
    want to have to enter your credentials every time you push to GitHub, you can hit enter
    twice more to leave the passphrase blank. Once the key has been generated, you can copy
    it to the clipboard with the following command:

    ```
    cat ~/.ssh/id_rsa.pub | pbcopy
    ```

    Login to GitHub and go to [your ssh key settings](https://github.com/settings/keys)

    ![Click the Add SSH Key button](https://docs.github.com/assets/images/help/settings/ssh-add-ssh-key.png)

    - 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".

    -
    ![SSH Key Paste](https://docs.github.com/assets/images/help/settings/ssh-key-paste.png)

    Your key should be in the clipboard from before. Next you can click the button.

    ![SSH Add Key Button](https://docs.github.com/assets/images/help/settings/ssh-add-key.png)

    You may be asked to confirm your password at this point.

    ![Confirm Password Form](https://docs.github.com/assets/images/help/settings/sudo_mode_popup.png)

    Finally, to test this out, you can run the following command again to test the SSH connection to GitHub:

    ```bash
    ssh -T [email protected]
    ```

    If all is well, you'll see something like this:

    ```
    Hi DakotaLMartinez! You've successfully authenticated, but GitHub does not provide shell access.
    ```

    And you're good to go! 👍