7

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
2
  • I hand typed it and double checked that I had the right user path. Still Problems Parsing JSON. Commented Apr 19, 2013 at 10:44
  • I have this same problem. Just following the official docs. Commented Jun 18, 2014 at 8:33

2 Answers 2

2

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
Sign up to request clarification or add additional context in comments.

Comments

0

Try including your token or password like this

  curl --data '{"name":"testrepo"}' \
       -X POST -u username:$TOKEN \
       https://api.github.com/user/repos

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.