I\'ve been somewhat \'putting up\' with Github always asking for my username and password when I clone a repository. I want to bypass this step because it is an annoyance w
Use ssh-add command to add your public key to the ssh-agent.
ssh-add
Make sure the ssh public key e.g. ~/.ssh/id_rsa.pub is what you have in your repo settings.
Make sure you can actually ssh into the server e.g. For Bitbucket:
ssh -T git@bitbucket.org
Update the url to move from https to ssh. You can check which you use by checking the output of:
git remote -v
If you see a https:// in the urls, then you are still using https. To update it: Take the url and just replace https:// with ssh:// e.g. Change:
https://git@bitbucket.org/../..
To:
ssh://git@bitbucket.org/../..
Referenced: https://docs.github.com/en/github/using-git/changing-a-remotes-url#switching-remote-urls-from-https-to-ssh