Skip to content

Instantly share code, notes, and snippets.

@wtrocki
Created June 22, 2016 16:05
Show Gist options
  • Save wtrocki/3874956de99947f4e0b9853b52d130d8 to your computer and use it in GitHub Desktop.
Save wtrocki/3874956de99947f4e0b9853b52d130d8 to your computer and use it in GitHub Desktop.
Openshift ssh key secrets generator
## Secrets generator for RHMAP
TEMP_KEY_STORE=/tmp/kubernetes-secrets
mkdir -p $TEMP_KEY_STORE
## Generate keys
ssh-keygen -b 1024 -N '' -f $TEMP_KEY_STORE/id_rsa
# Create secrets
oc secrets new gitlab-keys repo-prv=$TEMP_KEY_STORE/id_rsa \
repo-pub=$TEMP_KEY_STORE/id_rsa.pub
## Cleanup
rm -Rf $TEMP_KEY_STORE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment