How to authenticate with GitHub using SSH

Share this video with your friends

Send Tweet

Anytime you push code to GitHub, you must be authenticated so GitHub knows you are authorized to make changes. In this lesson we’ll learn how to authenticate with GitHub using SSH so we don’t have to enter our username and password each time we push code to GitHub.

Frederic Rey
Frederic Rey
~ 8 years ago

Hi!

I had the error "Could not open a connection to your authentication agent" when I tried the 'ssh-add' command (Windows 10 x64 & Git Bash). That being said,I was able to make it work by executing the following commands before (thanks StackOverflow)

exec ssh-agent bash eval ssh-agent -s

Oalbacha Albacha
Oalbacha Albacha
~ 7 years ago

I am having the following error: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0755 for '/Users/omaralbacha/' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. .ssh/id_rsa: No such file or directory

Prosper Opara
Prosper Opara
~ 6 years ago

Hello Fedrick I tried your solution but it did not work on my machine

Prosper Opara
Prosper Opara
~ 6 years ago

eval "$(ssh-agent -s)" works for me on windows, the authentication was successful.