Replace ACCESS_TOKEN
with Git OAuth Token and NEW_REPO_NAME
with your New Repository Name in the command below:
curl -H "Authorization: token ACCESS_TOKEN" -d '{"name": "NEW_REPO_NAME", "private": <true/false>, "description": "<add_a_little_info_about_the_repo>"}' https://api.github.com/user/repos
Or like...
curl -i -X POST https://api.github.com/user/repos \
-H "Authorization: token <ACCESS_TOKEN>" \
-d @- << EOF
{
"name": "<NEW_REPO_NAME>",
"auto_init": true,
"private": <true/false>,
"description": "<add_a_little_info_about_the_repo>"
}
EOF
curl -H "Authorization: token ACCESS_TOKEN" -d '{"name": "NEW_REPO_NAME"}' https://api.github.com/orgs/ORGANISATION_NAME/repos