All Projects → larsxschneider → Scotty

larsxschneider / Scotty

Licence: mit
Helper scripts for GitHub Enterprise admins

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Scotty

Work Dummy
Ever needed to faff or pretend to be seriously at work? This repository hosts a powershell script that'd make anyone think you definitely bursting your ass solving problems.
Stars: ✭ 26 (-66.23%)
Mutual labels:  bash-script
Search Docker Registry V2 Script.1.0
view-private-registry is a simple bash script for listing images in a private registry v2, docker search registry-v2
Stars: ✭ 34 (-55.84%)
Mutual labels:  bash-script
Rsync
In the process of being transitioned to a node.js action.
Stars: ✭ 53 (-31.17%)
Mutual labels:  bash-script
Ubuntu Setup
script to configure fresh ubuntu install, or to update existing install
Stars: ✭ 8 (-89.61%)
Mutual labels:  bash-script
Cfhookbash
Cloudflare hook bash for dehydrated - DNS-01 Challenge Let's Encrypt
Stars: ✭ 28 (-63.64%)
Mutual labels:  bash-script
Padd
PADD (formerly Chronometer2) is a more expansive version of the original chronometer.sh that is included with Pi-Hole. PADD provides in-depth information about your Pi-hole.
Stars: ✭ 1,011 (+1212.99%)
Mutual labels:  bash-script
Wsl Docker Git Setup
Shell script to configure Windows Subsystem for Linux (WSL) & Ubuntu on Windows to use docker and docker-compose as well as a git-enabled prompt
Stars: ✭ 23 (-70.13%)
Mutual labels:  bash-script
Changelog Ci
Changelog CI is a GitHub Action that generates changelog, Then the changelog is committed and/or commented to the release Pull request.
Stars: ✭ 68 (-11.69%)
Mutual labels:  bash-script
Simple Sh Datascience
A collection of Bash scripts and Dockerfiles to install data science Tool, Lib and application
Stars: ✭ 32 (-58.44%)
Mutual labels:  bash-script
Bashrc
System to organize and synchronize bash startup files and other files in your home directory
Stars: ✭ 52 (-32.47%)
Mutual labels:  bash-script
Macos Virtualbox
Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox for Windows, Linux, and macOS
Stars: ✭ 11,634 (+15009.09%)
Mutual labels:  bash-script
Bashmultitool
A library for bash shell program containing useful functions. Can be imported into scripts to create colourful and functional scripts and TUIs.
Stars: ✭ 27 (-64.94%)
Mutual labels:  bash-script
Run script
Run shell scripts in rust.
Stars: ✭ 42 (-45.45%)
Mutual labels:  bash-script
Add Copyright
This is a Script to Automate adding the Copyright text to one or more source files Recursively.
Stars: ✭ 27 (-64.94%)
Mutual labels:  bash-script
Wine Origin Updater
Updater for Origin in Wine
Stars: ✭ 57 (-25.97%)
Mutual labels:  bash-script
Craft Do Forge Recipe
Digital Ocean / Forge Recipe for CraftCMS websites
Stars: ✭ 24 (-68.83%)
Mutual labels:  bash-script
House
Proof of Concept and Research repository.
Stars: ✭ 37 (-51.95%)
Mutual labels:  bash-script
Git Gud
A simple git commit checker
Stars: ✭ 77 (+0%)
Mutual labels:  bash-script
Bazel and compilecommands
Add compile_commands.json to your C++ Bazel Project
Stars: ✭ 62 (-19.48%)
Mutual labels:  bash-script
Fuckjack
FUCK JACK!
Stars: ✭ 50 (-35.06%)
Mutual labels:  bash-script

Scotty - Your GH Enterprise Technician 🚀

Scotty is a collection of helper scripts for GitHub Enterprise administrators.


⚠️ Attention: These scripts are not supported by GitHub. Use them at your own risk! ⚠️


Initial Setup

Copy ghe.config.template to ghe.config and adjust it to your environment. In addition, it is recommended to setup the Git credential helper as this mechanism is used for GitHub API calls.

General Info

There are two types of scripts. The first type are report scripts. These scripts query all kinds of information but they do not change anything on the GitHub Enterprise instance. The second type are admin scripts. These scripts perform actions and change things on your instance. Please handle the admin scripts with special care.

You can learn more about every script by calling it with the -h or --help parameter. In addition, most of the scripts will print what they would do in a "dry-run" mode triggered with the -n parameter.

Examples

Investigate errors

Let's say you see a lot of babeld errors on your GitHub Enterprise System Health dashboard. You can run the following command to see all babeld errors aggregated by the hour:

./reports/babeld-errors.sh

If you spot an error that has a very high frequency, then you can look at the error over all available log data aggregate by day:

./reports/babeld-errors.sh --all --day | grep "your error"

This way you might see when the error frequency started to increase. You can query the auth and the exception log in the same way.

Find users that create too many LDAP requests

If LDAP is enabled, then HTTP(S) requests against GitHub Enterprise via username/password are expensive because every request issues an additional request against LDAP. Run this command to lists the 10 users that made the most username/password requests via HTTP(S) recently:

./reports/auth-http-without-token.sh --all
Attach files to a support bundle

If you want to share the chrony logs with GitHub support, then you can attached them to the support ticker 54321 with the following command:

./admin/support-bundle-attach.sh 54321 '/var/log/chrony/*'
Fork Open Source repositories

If you want to fork an Open Source repository to your GitHub Enterprise instance, then you can use this command:

./admin/oss-fork.sh --create scotty kirk,bones https://github.com/larsxschneider/scotty

The command will fork the repository to your common Open Source organization (defined in ghe.config) using the name "scotty". It will protect all upstream branches and configure them in a way that only the "fork update user" (defined in ghe.config) can modify them. Finally, it will grant the users "kirk" and "bones" write access.

You can update all branches of an existing fork with the upstream state with the following command:

./admin/oss-fork.sh --update scotty
Remove sensitive data

If you want to purge sensitive data from a repository, then you should rewrite the history. Afterwards the data won't be easily accessible anymore but still be available on the GitHub Enterprise instance. Use the following command to purge all traces after you have rewritten the history:

./admin/repo-remove-sensitive-data.sh org/repo

Contributions

These scripts are far from perfect. If you see ways to improve them or if you have ideas for new useful scripts, then I am happy to review your Pull Request.

Acknowledgments

Almost all tricks used in these scripts I learned from the fine GitHub Enterprise support crew!

License

Scotty is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].