Skip to content

Instantly share code, notes, and snippets.

@JohnLBevan
Last active June 16, 2020 17:20
Show Gist options
  • Select an option

  • Save JohnLBevan/2360400de31f5851cac80a3205a3ffb3 to your computer and use it in GitHub Desktop.

Select an option

Save JohnLBevan/2360400de31f5851cac80a3205a3ffb3 to your computer and use it in GitHub Desktop.
Fix issues caused by ssh agent not running
# 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"
@JohnLBevan

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment