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 ‘https://github.com/username/repo.git/‘“.
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.
This deletes that which points to the https: and adds the ssh version of the repo.