I’m stuck using https for git pulls… I have tried to switch to ssh but every time I try to add my identity, I get a “Could not open a connection to your authentication agent”.
I tried creating many keys and adding them to git but to no avail. I’m turning to the forums to get some guidance
sudo git pull Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
I’m on ubuntu 16.04
These are the contents of my ~/.ssh/
-rw------- 1 macrandle macrandle 744 Nov 8 07:40 authorized_keys -rw-rw-r-- 1 macrandle macrandle 120 Mar 23 06:18 config -rw------- 1 macrandle macrandle 3326 Nov 8 08:02 id_rsa -rw-r--r-- 1 macrandle macrandle 743 Jan 13 22:19 id_rsa.pub -rw------- 1 root root 3326 Mar 23 00:17 id_rsa_work -rw-r--r-- 1 root root 743 Mar 23 00:17 id_rsa_work.pub -rw-r--r-- 1 macrandle macrandle 2652 Jan 13 22:29 known_hosts
I’m trying to add id_rsa_work and my keys are added to my github account
I have tried
sudo ssh-add ~/.ssh/id_rsa_work
this leads to “Could not open a connection to your authentication agent”
Any help would be great.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!