Skip to content

Instantly share code, notes, and snippets.

@kylemacey
Forked from bitoiu/Gemfile
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylemacey/7f9083d4a47a2bdaaba5 to your computer and use it in GitHub Desktop.
Save kylemacey/7f9083d4a47a2bdaaba5 to your computer and use it in GitHub Desktop.
Audit Requirements
source 'https://rubygems.org'
gem 'octokit'
gem 'axlsx'

Link to script

In order to run instance_auditor.rb you must have an environment capable of running Ruby scripts. This script generates a .xlsx file so you'll also need a tool that can open it (such as Microsoft Excel, Libre Office, or Numbers).

To get an instance wide audit follow these steps:

  1. Log in as the GHE Site Admin and generate a personal access token with read:org scope
  2. SSH into the GHE VM and run ghe-org-owner-promote. This will make the site admin an owner in all organizations.
  3. Set GITHUB_TOKEN to the token you've just generated
  4. Set GITHUB_API_ENDPOINT to http(s)://[your-hostname]/api/v3/
  5. Download the instance_auditor.rb and Gemfile to a new folder
  6. Run bundle install to retrieve the script's dependencies
  7. Run the script to generate the audit report: ruby instance_auditor.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment