Skip to content

Instantly share code, notes, and snippets.

@pemd-sys
Forked from matrix-morpheus/Ubuntu-git-cli.md
Created November 17, 2022 20:56
Show Gist options
  • Save pemd-sys/8cc5a1e82b8d9c15792b3682acc044e2 to your computer and use it in GitHub Desktop.
Save pemd-sys/8cc5a1e82b8d9c15792b3682acc044e2 to your computer and use it in GitHub Desktop.

Revisions

  1. @matrix-morpheus matrix-morpheus revised this gist Nov 17, 2022. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Ubuntu-git-cli.md
    Original file line number Diff line number Diff line change
    @@ -19,6 +19,8 @@ $ cat ~/.ssh/id_ed25519.pub

    copy the output

    add the key to your github profile

    Go to the repo directory
    $ vim .git/config

  2. @matrix-morpheus matrix-morpheus revised this gist Nov 17, 2022. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions Ubuntu-git-cli.md
    Original file line number Diff line number Diff line change
    @@ -29,6 +29,7 @@ change the url to accept ssh push should be of the following format:
    url = [email protected]:matrix-morpheus/jekyll-theme-chirpy.git
    save and then run

    $ git push

    should complete without errors
  3. @matrix-morpheus matrix-morpheus revised this gist Nov 17, 2022. 1 changed file with 8 additions and 8 deletions.
    16 changes: 8 additions & 8 deletions Ubuntu-git-cli.md
    Original file line number Diff line number Diff line change
    @@ -7,28 +7,28 @@ https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a
    https://mkyong.com/git/github-keep-asking-for-username-password-when-git-push/

    ## commands
    ssh-keygen -t ed25519 -C "virtualbox-qt"
    $ ssh-keygen -t ed25519 -C "virtualbox-qt"

    give no passphrase

    eval "$(ssh-agent -s)"
    $ eval "$(ssh-agent -s)"

    ssh-add ~/.ssh/id_ed25519
    $ ssh-add ~/.ssh/id_ed25519

    cat ~/.ssh/id_ed25519.pub
    $ cat ~/.ssh/id_ed25519.pub

    copy the output

    Go to the repo directory
    vim .git/config
    $ vim .git/config

    change the url to accept ssh push
    should be of the following format:
    change the url to accept ssh push should be of the following format:

    [remote "origin"]

    url = [email protected]:matrix-morpheus/jekyll-theme-chirpy.git
    save and then run
    git push
    $ git push

    should complete without errors
  4. @matrix-morpheus matrix-morpheus created this gist Nov 17, 2022.
    34 changes: 34 additions & 0 deletions Ubuntu-git-cli.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    # Howto setup git in ubuntu command line

    https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

    https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

    https://mkyong.com/git/github-keep-asking-for-username-password-when-git-push/

    ## commands
    ssh-keygen -t ed25519 -C "virtualbox-qt"

    give no passphrase

    eval "$(ssh-agent -s)"

    ssh-add ~/.ssh/id_ed25519

    cat ~/.ssh/id_ed25519.pub

    copy the output

    Go to the repo directory
    vim .git/config

    change the url to accept ssh push
    should be of the following format:

    [remote "origin"]
    url = [email protected]:matrix-morpheus/jekyll-theme-chirpy.git

    save and then run
    git push

    should complete without errors