Last active
June 16, 2020 17:20
-
-
Save JohnLBevan/2360400de31f5851cac80a3205a3ffb3 to your computer and use it in GitHub Desktop.
Fix issues caused by ssh agent not running
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # git@github.com: Permission denied (publickey). | |
| # fatal: Could not read from remote repository | |
| # Please make sure you have the correct access rights and the repository exists | |
| # run git bash | |
| #ssh-agent | |
| eval `ssh-agent` | |
| # should output: Agent pid #### | |
| # change the filename in the below to match your key file (found under `%userprofile%/.ssh`) | |
| ssh-add ~/.ssh/my_id_rsa_filemy_id_rsa_file | |
| # should output: Idenity added: /c/users/%username%/.ssh/ | |
| # after this, other commands requiring ssh key to authenticate against github should work | |
| # it looks like the ssh-agent service also runs an ssh-agent process under the system account; this can run in parallel, but seems to not be enough on its own. | |
| #pwsh -command "restart-service ssh-agent" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related post with additional info and answers: https://stackoverflow.com/questions/17846529/could-not-open-a-connection-to-your-authentication-agent