change origin of github repo from 'https:'' To 'ssh'

Recently, while trying to push to a new repo on Github, I kept getting this error: “remote: Invalid username or password.
fatal: Authentication failed for ‘‘“.

It took me a bit to realize that I had accidentally cloned the https: version of the repo instead of the ssh version.

Here’s the fix.

git remote -v
git remote remove origin
git remote add origin

This deletes that which points to the https: and adds the ssh version of the repo.