Skip to content

Instantly share code, notes, and snippets.

@anri-c
Created August 9, 2016 06:50
Show Gist options
  • Select an option

  • Save anri-c/23f8d612fa2987f15b58aecfd589f261 to your computer and use it in GitHub Desktop.

Select an option

Save anri-c/23f8d612fa2987f15b58aecfd589f261 to your computer and use it in GitHub Desktop.
github api get user pubkey
ENDPOINT=https://api.github.com
TOKEN=ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
USERS=(
user1
user2
user3
)
for NAME in ${USERS[@]}
do
curl -H "Authorization: token ${TOKEN}" ${ENDPOINT}/users/${NAME}/keys | jq -r ".[].key" > keys/${NAME}.keys
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment