Skip to content

Instantly share code, notes, and snippets.

@darrenrogan
Last active January 13, 2016 01:48
Show Gist options
  • Save darrenrogan/9f50dcba1ef8b8cd69c7 to your computer and use it in GitHub Desktop.
Save darrenrogan/9f50dcba1ef8b8cd69c7 to your computer and use it in GitHub Desktop.
This is a simple script that adds a github user to the ssh key authorized keys
# Usage: add_gh_key <github username>
# Credit - https://github.com/darrenrogan
function add_gh_key() {
NAME=$1 && KEY="$(curl -s https://github.com/$NAME.keys)" && echo "$KEY" $NAME >> ~/.ssh/authorized_keys
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment