Skip to content

Instantly share code, notes, and snippets.

@prashcr
Created October 16, 2015 12:28
Show Gist options
  • Save prashcr/fd324b6d5bd90d1eb011 to your computer and use it in GitHub Desktop.
Save prashcr/fd324b6d5bd90d1eb011 to your computer and use it in GitHub Desktop.
bash script to create a new GitHub repo
# Creates a new GitHub repo
# Save your token in a file called gh-token in current dir
printf "Repo name: "
read repoName
curl -H "Authorization: token $(cat gh-token)" -d "{ \"name\": \"$repoName\" }" https://api.github.com/user/repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment