1

What's the command to verify SSH keys are properly added for git? There are 2 sets of keys under our ~/.ssh/ and we want to add both of them. What we did was to run ssh-add -l in git bash:

$ ssh-add -l
2048 28:1b:b8:b2:a8:f1:9b:bb:b5:85:21:d5:d8:0b:00:b2 /c/Users/myuser/.ssh/bb_rsa (RSA)
2048 3d:31:e8:f7:f5:cd:dd:c7:0b:84:16:66:23:95:af:05 /c/Users/myuser/.ssh/id_rsa (RSA)

Are those 2 sets of SSH keys shown in command ssh-add properly added for git(both public and private)?

We are getting permission denied when deploying and would like to verify that the keys are added properly.

1
  • 1
    What do you mean by 'loaded'? Commented Jun 12, 2015 at 1:11

1 Answer 1

2
  • You need to add only the public keys under your github account.

    • Set the remote url to ssh protocol if its not set already:
      git remote set-url origin <url>

    • Try to do any remote operation like:

      git fetch --all --prune
      git pull
      

If the ssh is not set correctly you will get an error message.

Note:
On the first operation you might get a question asking you if you wish to add the ssh key to the known hosts. Answer with yes and it will not prompt again.

If you keep getting the Permission denied error?

  • Verify that the github user is a contributer to the project.
Sign up to request clarification or add additional context in comments.

1 Comment

Verify that the github user is a contributer to the project.. This is the problem we are having. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.