Assuming that you have used ssh-keygen
to generate a key pair and uploaded the public key in the appropriate place in your github account, you should be able to set remote to use the url git@github.com:username/repo.git
.
git remote set-url origin git@github.com:username/repo.git
If you do not have local changes that you care about, you can just delete your local repository and clone again:
git clone git@github.com:username/repo.git
Here are github's instructions on this setup, which you can use as a reference as needed.