Skip to content

Instantly share code, notes, and snippets.

@hachibeeDI
Created March 31, 2014 09:01
Show Gist options
  • Save hachibeeDI/9888247 to your computer and use it in GitHub Desktop.
Save hachibeeDI/9888247 to your computer and use it in GitHub Desktop.
sshの公開鍵をさくっと取得するスクリプト ref: http://qiita.com/hatchinee/items/7174b2a23788a23a6082
#/bin/sh -u
set -e
readonly DEFAULT_USER='hachibeeDI'
if [ $# -ge 2 ]; then
echo 'too much arguments'
exit 1
fi
if [ -z $1 ]; then
readonly USER_NAME=$DEFAULT_USER
else
readonly USER_NAME=$1
fi
readonly GITHUB_PUBKEY_API="https://github.com/${USER_NAME}.keys"
curl $GITHUB_PUBKEY_API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment