Using SSH with github after cloning it as HTTPS

I did a mistake and cloned github as https:

$ git clone

Then after trying to submit a commit is was failing to accept my password:

$ git push origin master
Username for '': acassis
Password for '':
remote: Invalid username or password.

To error was happening because the https is not the right repository to authenticate with your SSH Keys.

After spending some minutes trying to figure out what happend I found the solution:

$ git remote set-url origin

This command will change the repository URL to use the SSH address.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s