How to extract public keys from github enterprise

Last modified date

The following post will explain how to get all the public keys used by members of a team in github.
This can be useful whenever you want to setup ssh keys to give access to a new machine.

Before starting you need an access token in order to call your GitHub api, the easiest way is creating a personal access token and select the read:org as in the screenshot below. If you are interested in other in other authorization mechanisms refere to the official documentation.

Create a personal access token