Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github returns "Problems parsing JSON" when trying to create repo using curl

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
like image 807
rross Avatar asked Apr 18 '13 21:04

rross


1 Answers

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
like image 135
Ivan Zuzak Avatar answered Nov 15 '22 11:11

Ivan Zuzak