I have looked up other questions but do not get the same results the answers have provided.
I initially had my DigitalOcean droplet backed up with a github repo using https.
I have followed all of the instructions (multiple times) at https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh/about-ssh
I have deleted the old .git folder. I have updated the ~/.ssh/config file according to: How to permanently add a private key with ssh-add on Ubuntu?
Everytime I push or 'git push --set-upstream origin main' I get the option to input my username and password and then get rejected for using https.
I have also updated my ~/.ssh/config file to:
HostName github.com
User git
IdentityFile ~/.ssh/yourPrivateKeyName
IdentitiesOnly yes