Skip to content

Instantly share code, notes, and snippets.

@jezman
Forked from simbalinux/create_repo
Last active August 14, 2018 11:51
Show Gist options
  • Save jezman/d16db0dfbe12db4cde674908b64c99c3 to your computer and use it in GitHub Desktop.
Save jezman/d16db0dfbe12db4cde674908b64c99c3 to your computer and use it in GitHub Desktop.
create_repo
#!/usr/bin/env bash
repo_name=$1
test -z $repo_name && echo "Repo name required." 1>&2 && exit 1
curl -XPOST -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user/repos -d "{\"name\":\"$repo_name\"}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment