Created
January 23, 2016 22:30
-
-
Save ozymandium/078130fd36007af7de33 to your computer and use it in GitHub Desktop.
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 | |
#Register your default SSH public key with Github | |
#usage: | |
# ./github_reg_key.sh <github_username> | |
# | |
curl -u "$1" \ | |
--data "{\"title\":\"`uname -n`_`echo $USER`_`date +%Y%m%d%H%M%S`\",\"key\":\"`cat ~/.ssh/id_rsa.pub`\"}" \ | |
https://api.github.com/user/keys |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment