Making public repos private

I’m our site’s GHE appliance administrator, and I’m trying to help clean up our repos.

I can see how to use the API to make another user’s public repo’s private by generating an impersonation authorization token, and editing the repo with the new token.  However, this only works for active users.

I’d like to do the same with the public repos on our suspended users.  This is do-able via the GUI, but I cannot see the way to do this via the api.  I can delete the user entirely, but I would like to just change their repos to private before we wait a while to delete them to give anyone who is accessing them a chance to notify us.  

Is this possible, or am I going to have to script interacting with the GUI frontend instead?



1 Like

Hi @wembleyford2,

Thank you for being here and please accept my sincere apologies for our in delay in response. As far as I know there is no dedicated API to accomplish this. I’ve taken your post and passed it along  as feedback to the appropriate teams. 

Any updates on this?

I’d like to provide one single command that will loop through all my repositories and make them all private in one shot.

I’m surprised there’s no API for this.

Please let me know if this has been implemented.