Is there any git command/script to create new GitHub repository from CLI?
Asked
Active
Viewed 78 times
1 Answers
2
This is one way to do it (change REPO and USERNAME):
curl -d '{"name": "REPO"}' -u USERNAME https://api.github.com/user/repos
If you are using two factor auth, you'll also need to add this as part of the curl invocation:
-H X-GitHub-OTP:123456
Replace 123456 with the current 2FA value from your token generator (you'll need to be quick).

davejagoda
- 188
- 6