SSH key failing for organization, works for personal

I have an SSH key paired with my GitHub account. When I use SSH for a project that is just mine, there is no problem. When I copy the SSH key for a project in an organization I’m a part of, I get the error Could not read from remote repository. If I use HTTPS for that same organization account, it works successfully.

So I know that my SSH key works because I can get my personal projects with it. And I know that I have access rights to the repo, because I can get it with HTTPS. But SSH on the repo fails.

Does anyone have any ideas as to why that might be the case?

Hi @cssinate, if your organization has SAML enabled, you have to explicitly enable (authorize) your personal SSH key or personal access token for use with that organization,

@byrneh SAML is a paid enterprise feature, right? Our organization is just on the free tier. Thank you for taking the time though.

What do you mean by this:

When I copy the SSH key for a project in an organization I’m a part of

This sounds like something you shouldn’t have to do.

Yes SAML is paid enterprise.
Its most likely to do with your local Git/SSH configuration then.

Sorry for the miscommunication. I meant to say the same keypair is being used for both the personal project in my own account, as well as the project in the organization. One GitHub account, one SSH keypair, two separate projects. The key works on one, doesn’t work on the other. The one it doesn’t work on is inside an organization, for which I was granted all possible permissions.

Sorry, but I’m bumping this. I’m still having this issue. My SSH key works for all my personal projects, but not for the one in my organization.

Hey - sorry - it’s holiday time of year for a lot of people right now, and this is not my area of expertise.

We do have troubleshooting information here for common SSH errors:

That said, you might get more of a response here with more information. Operating system can make a difference with SSH a lot of the time, and also what kind of error messages you’re seeing when you try to push to the organisation repository.


  1. What application are you using? On which OS?
  2. What error are you seeing from which commands?

If you need to share details relating to a private repository or your SSH keys, then you may want to open a ticket so that this can be addressed in private.