5

I'm a collaborator on a private Github repo (owned by someone else), and although I have added an SSH key to my own GitHub account which allows me to authenticate when accessing my own repositories, it always asks me for my password when I try to access the repository on which I am only a collaborator.

Do you have any idea why it doesn't authenticate me with my SSH key?

I have tried to add my key as a "deploy key" to the shared repo itself, but GitHub always rejects my submission, with the error message "Key is already in use.".

My remote looks like the following:

$ git remote -v
origin  https://example-user@github.com/example-owner/example-project.git (fetch)
origin  https://example-user@github.com/example-owner/example-project.git (push)
2
  • 1
    Are you trying to push code trough ssh? How does link to your temote look like?
    – mpm
    Nov 1, 2014 at 12:53
  • Added remotes above. Nov 3, 2014 at 20:45

1 Answer 1

6

You've added the github repo as HTTPS instead of via SSH, your URL should look something like this

git@github.com:example-owner/example-project.git

If you check the right of the repo on github, you should see options to get the links via HTTPS, SSH, or subversion.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.