How can I clone a private project from my organization account?

On our cloud infrastructure, we have an auto-scaling service which basically launches servers automatically when needed. I can make the servers run some scripts before they start up. One of the scripts I want them to run is to git clone our repository which is a  private repository in our  organization account.

So I made a private key on our server and now I want to add it to GitHub. But the only place I can put it on GitHub is into my personal account (that I use to contribute to the project). But I don’t want it connected to my personal account and I don’t see where I can add a private key in our organization account when I go to settings. How should I go about doing this?

Hi @askyous,

Organization accounts don’t function quite the same as User accounts. You cannot log into Organization accounts, nor can you do Git operations with them. If you want to run a Git clone from an account that is not your own, you will either need to use a Deploy Key or create a Machine User. You could also consider building an app that does this for you.

Hope that helps!

1 Like