I created ssh key as per this tutorial.
Assigned it to the ssh-agent.
Added it to the github account as per this tutorial.
ssh-add -l -E md5
Shows correct footprint
ssh -T [email protected]
Says:
Hi <My username>! You've successfully authenticated, but GitHub does not provide shell access.
But still:
git push
Asks for:
Username for 'https://github.com':
Any idea? Thanks in advance.
Make sure the authorized_keys file and the private key itself have the correct permissions and ownership. Check that key-based authentication is allowed by the server. Make sure the private key is readable by the SSH client. If you're using PuTTY, make sure your SSH keys are properly configured for the session.
In terminal enter this command with your ssh file name pbcopy < ~/. ssh/id_rsa. pub This will copy the file to your clipboard Now open you github account Go to Settings > SSH and GPG keys > New SSH key Enter title and paste the key from clipboard and save it. Voila you're done.
Check out this: switching-remote-urls-from-https-to-ssh
High are the changes that you clone your repo over HTTPS and now want to push using SSH.
As suggested on the GitHub site check your remote origin by doing this:
$ git remote -v
origin https://github.com/USERNAME/REPOSITORY.git (fetch)
origin https://github.com/USERNAME/REPOSITORY.git (push)
In case you have https...
change it to ssh
by doing something like this:
git remote set-url origin [email protected]:USERNAME/REPOSITORY.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With