Reputation: 2276
I'm attempting to create a repo on github using curl. No matter how I attempt to format my JSON it always returns "Problems parsing JSON". Is there something I'm missing? Here is my statement:
curl --data '{"name":"newRepoName"}' -XPOST -u username:password http://giturl
Upvotes: 7
Views: 4535
Reputation: 160
Try including your token or password like this
curl --data '{"name":"testrepo"}' \
-X POST -u username:$TOKEN \
https://api.github.com/user/repos
Upvotes: 0
Reputation: 18772
Strange since it works for me. Are you using the correct GitHub API endpoint (/user/repos)?
curl --data '{"name":"testrepo"}' -X POST -u username https://api.github.com/user/repos
Upvotes: 2