In order to run team_audit.rb
you must have an environment capable of running Ruby scripts.
To get an instance wide audit follow these steps:
- Log in as the GHE Site Admin and generate a personal access token with at least
read:org
scope checked. - SSH into the GHE VM and run
ghe-org-owner-promote
. This will make the site admin an owner in all organizations. Without this, the site admin account may not have sufficient permissions to run this script on all organizations. - Set the GITHUB_TOKEN variable to the token you've just generated when creating the personal access token.
- Set the GITHUB_API_ENDPOINT variable to
http(s)://[your-hostname]/api/v3/
replacing[your-hostname]
with the hostname of your GitHub Enterprise installation. - Download or copy the
team_audit.rb
file andGemfile
(located in this Gist) to a new folder on your machine. - Run
bundle install
inside of that folder to retrieve the script's dependencies. - Run the script to generate the audit report:
ruby team_audit.rb <ORG>
replacing<ORG>
with the name of the organization you wish to run the report for.