Trouble with SSH

I’m trying to use SSL instead of a password. It worked one time but now fails. This is the message I receive:
ssh -T git@github.com
Hi southkonafarms! You’ve successfully authenticated, but GitHub does not provide shell access.

???

-south kona farms

That is no failure. It means your SSH key works and GitHub recognizes it for your account. You can now use SSH as a transport for Git (e.g. git push).

1 Like

When I type git push, it continues to ask for a password. What am I doing wrong?

  • south kona farms

Most likely your local repository is still configured to use a HTTPS URL to access the GitHub repository. You need to change the URL to the SSH one. You can find the right URL by clicking the green “Code” button on the repository page and selecting “SSH”, it should look something like this:

git@github.com:user/repo.git

You can change the remote URL with the following command (change URL and remote name as needed):

git remote set-url origin git@github.com:user/repo.git

origin is the default remote name for where you initially cloned from. If you need to use something different, you probably already know.

See also: Git - Working with Remotes

1 Like

Thank you

git remote set-url origin git@github.com:southkonafarms/cosmos.git

did the trick.

south kona farms

3 Likes

Please select Trouble with SSL - #4 by airtower-luna and mark it as the solution.

1 Like

Solution posted
git remote set-url origin git@github.com:southkonafarms/cosmos.git