managing ssh public keys on github organizations repositories

digitaldreamer picture digitaldreamer · Aug 17, 2011 · Viewed 8.8k times · Source

I was wondering if anyone has a good, clean, safe way to manage github Organization repository access on their servers?

It seems that you can only attach pub keys to your personal account and cannot restrict access solely to an organization.

We've got a beta server where we put multiple projects so deploy keys, because they need to be unique, aren't ideal. It would be nice to give global access to the organization, but I don't want to give the server, which we have freelancers on, full access to my personal account (The server gets access to the organization, which is good, but also to my personal projects and every other organization I belong to, which is bad).

The two workarounds that I see is to either set up a dummy github user to go through, which seems stupid, or to enable ssh agent forwarding, which feels like a security risk (I'm not the best server-admin).

A friend suggested setting up the server as a remote to push to, but it seems like a band-aid solution.

I would like to think there's an easier way to set up access for an organization's repo as I would think it would be a fundamental need for everyone.

I'm all ears if anyone would like to share something that has/is working for their github organization.

I'll probably just bite the bullet and create a dummy github user and call it a day, I need to get work done.

Answer

orlanthi picture orlanthi · Mar 5, 2012

An alternative to the answer from sergey_mo (and as a direct answer Michał Szajbe's final question) is to create multiple ssh keys as documented by chalien on githib:

https://gist.github.com/jexchan/2351996