Skip to content

Instantly share code, notes, and snippets.

@matrix-morpheus
Last active November 17, 2022 22:31
Show Gist options
  • Save matrix-morpheus/b2811e24c4e6c77946d5c68af4fe76f3 to your computer and use it in GitHub Desktop.
Save matrix-morpheus/b2811e24c4e6c77946d5c68af4fe76f3 to your computer and use it in GitHub Desktop.
Setup git CLI on ubuntu 22.04

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/

https://stackoverflow.com/questions/1298499/git-push-not-send-changes-to-remote-git-repository

https://www.earthdatascience.org/workshops/intro-version-control-git/basic-git-commands/

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

add the key to your github profile

Go to the repo directory $ vim .git/config

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

[remote "origin"]

    url = git@github.com:matrix-morpheus/jekyll-theme-chirpy.git

save

to commit changes

$ git add .

$ git commit -m "updates done by..."

$ git push

should push without errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment