How to create a repo using github api

In this article let’s discuss about How to create a repo using github api. Let’s go through the following methods without any delay.

Method 1:

#On your Github account: go to Settings -> Developer Settings -> Personal Access Token Under OAuth Apps. 
#Now, Generate a New Access token with Required privileges enabled. Ignore This if you already have one. 
#Replace ACCESS_TOKEN with Token and NEW_REPO_NAME with your New Repository Name in the command below:

curl -H "Authorization: token ACCESS_TOKEN" --data '{"name":"NEW_REPO_NAME"}'

Hope the above solution works.

Realted Posts : How to install requests python