Skip to content

Instantly share code, notes, and snippets.

@rashamalek
rashamalek / get-site-admin-report.sh
Created Feb 27, 2019 — forked from jdennes/get-site-admin-report.sh
Shell script to get Site Admin reports on GitHub Enterprise
View get-site-admin-report.sh
#!/bin/bash
# Export USERNAME, PASSWORD, and REPORT_URL
# REPORT_URL should look something like https://my.ghe/stafftools/reports/all_users.csv
# See: https://help.github.com/enterprise/admin/articles/site-admin-dashboard/#reports
set -e
for i in $(seq 1 5); do
echo "Trying to get report..."
result=$(curl -s -L -u $USERNAME:$PASSWORD $REPORT_URL)
View gist:f3eb818c90e98696230a8857868bac03
### Keybase proof
I hereby claim:
* I am rashamalek on github.
* I am rashamalek (https://keybase.io/rashamalek) on keybase.
* I have a public key whose fingerprint is 5EDB 8BCE 9BCA 3BCD D828 890D 5EDA E570 AFFE F7D0
To claim this, I am signing this object:
View keybase.md

Keybase proof

I hereby claim:

  • I am amirrasha on github.
  • I am rashamalek (https://keybase.io/rashamalek) on keybase.
  • I have a public key whose fingerprint is 5EDB 8BCE 9BCA 3BCD D828 890D 5EDA E570 AFFE F7D0

To claim this, I am signing this object: