Skip to content

Instantly share code, notes, and snippets.

@developius
Last active May 20, 2025 11:20
Show Gist options
  • Save developius/c81f021eb5c5916013dc to your computer and use it in GitHub Desktop.
Save developius/c81f021eb5c5916013dc to your computer and use it in GitHub Desktop.

Revisions

  1. developius revised this gist Dec 11, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -5,7 +5,7 @@ Generate a new SSH key:
    ssh-keygen -t rsa -C "[email protected]"
    ```

    Copy the contents of the file `~/.ssh/id_rsa.pub` to your SSH keys in your GitHub account settings.
    Copy the contents of the file `~/.ssh/id_rsa.pub` to your SSH keys in your GitHub account settings (https://github.com/settings/keys).

    Test SSH key:
    ```
  2. developius revised this gist Aug 18, 2019. 2 changed files with 29 additions and 24 deletions.
    29 changes: 29 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    Create a new repository, or reuse an existing one.

    Generate a new SSH key:
    ```
    ssh-keygen -t rsa -C "[email protected]"
    ```

    Copy the contents of the file `~/.ssh/id_rsa.pub` to your SSH keys in your GitHub account settings.

    Test SSH key:
    ```
    $ ssh -T [email protected]
    Hi developius! You've successfully authenticated, but GitHub does not provide shell access.
    ```

    Change directory into the local clone of your repository (if you're not already there) and run:

    ```
    git remote set-url origin [email protected]:username/your-repository.git
    ```

    Now try editing a file (try the README) and then do:

    ```
    $ git commit -am "Update README.md"
    $ git push
    ```

    You should not be asked for a username or password. If it works, your SSH key is correctly configured.
    24 changes: 0 additions & 24 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -1,24 +0,0 @@
    Create a repo.
    Make sure there is at least one file in it (even just the README)
    Generate ssh key:
    ```
    ssh-keygen -t rsa -C "[email protected]"
    ```
    Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings.
    Test SSH key:
    ```
    ssh -T [email protected]
    clone the repo:
    git clone git://github.com/username/your-repository
    ```
    Now cd to your git clone folder and do:
    ```
    git remote set-url origin [email protected]:username/your-repository.git
    ```
    Now try editing a file (try the README) and then do:

    ```
    git add -A
    git commit -am "my update msg"
    git push
    ```
  3. Finnian Anderson revised this gist Mar 24, 2015. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ git remote set-url origin [email protected]:username/your-repository.git
    Now try editing a file (try the README) and then do:

    ```
    git add -A (adds all files in that folder - excluding hidden files - to the commit file list.)
    git commit -a (all) -m "my update msg"
    git push (GO GO GO!)
    git add -A
    git commit -am "my update msg"
    git push
    ```
  4. Finnian Anderson created this gist Mar 24, 2015.
    24 changes: 24 additions & 0 deletions setup.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    Create a repo.
    Make sure there is at least one file in it (even just the README)
    Generate ssh key:
    ```
    ssh-keygen -t rsa -C "[email protected]"
    ```
    Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings.
    Test SSH key:
    ```
    ssh -T [email protected]
    clone the repo:
    git clone git://github.com/username/your-repository
    ```
    Now cd to your git clone folder and do:
    ```
    git remote set-url origin [email protected]:username/your-repository.git
    ```
    Now try editing a file (try the README) and then do:

    ```
    git add -A (adds all files in that folder - excluding hidden files - to the commit file list.)
    git commit -a (all) -m "my update msg"
    git push (GO GO GO!)
    ```