Skip to content

Instantly share code, notes, and snippets.

@AdrianKoshka
Forked from adampats/create_repo.sh
Last active November 18, 2015 01:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AdrianKoshka/2dd7ec4849c565a33bb9 to your computer and use it in GitHub Desktop.
Save AdrianKoshka/2dd7ec4849c565a33bb9 to your computer and use it in GitHub Desktop.
Create GitHub repo from command line and push
# Personal Access Token required - go here: https://github.com/settings/tokens
repo="newrepo"
gh_user="adriankoshka"
gh_token="mytoken"
curl -u "$gh_user:$gh_token" https://api.github.com/user/repos -d '{"name":"'$repo'"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment