Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github commits using SSH key

Tags:

git

ssh

I may have not understood the use of SSH key in Github completely.

I followed the Github docs [https://help.github.com/articles/generating-ssh-keys/] to create SSH key on my laptop and import the same SSH key on my Github account.

However When I tried to push my local changes to a project I have forked, the git Bash still asks for my github user id and password.

enter image description here

My understanding was; once I have configured SSH, I do not have to provide my gihub user account, passwords when committing changes becuase SSH takes care of it.

like image 402
Ayusman Avatar asked Sep 28 '22 04:09

Ayusman


People also ask

Can I SSH into GitHub?

You can connect to GitHub using the Secure Shell Protocol (SSH), which provides a secure channel over an unsecured network.

Do I need SSH keys for GitHub?

When you set up SSH, you will need to generate a new private SSH key and add it to the SSH agent. You must also add the public SSH key to your account on GitHub before you use the key to authenticate or sign commits.

How do I use SSH keys in GitHub?

Login to github.com and bring up your account settings by clicking the tools icon. Select SSH Keys from the side menu, then click the Add SSH key button. Name your key something whatever you like, and paste the contents of your clipboard into the Key text box. Finally, hit Add key to save.


1 Answers

When you clone your github repository you can select http and ssh url for github project.

You can clone with HTTPS, SSH or Subversion.

I think you should select ssh to work with ssh authentication. Check your cloned git project's config. There is a remore url that you can change to ssh url.

like image 77
Sigee Avatar answered Oct 31 '22 12:10

Sigee