This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## This script takes a list of HTTPS GitHub repository urls in a file called "repos.txt", creates a directory for each unique org, generates an RSA SSH key for each and stores in the directory, | |
## adds the keypair to a credhub import file, and uploads the public key to the GitHub repository as a read-only deploy key using API token from file token.txt. | |
## --tmarshall 20190703 | |
#set -x | |
set -e | |
repos=`cat repos.txt` || { echo "A repos.txt file with list of repos is required."; exit 1; } |