user2816191
user2816191

Reputation: 11

GitHub Problems Parsing JSON Command-Line Mac 10.6.8

I'm having a problem creating a repo on GitHub using curl. I think I'm formatting it correctly but I keep getting back "Problems parsing JSON" Here's what I'm doing:

Zachary-Dunhams-MacBook:foo zacharydunham$ curl -u 'ZachDunham' https://api.github.com/user/repos -d '{"name":foo"}'

Enter host password for user 'ZachDunham': { "message": "Problems parsing JSON", "documentation_url": "http://developer.github.com/v3"

I'm trying to follow this tutorial: http://gitref.org/creating/

Upvotes: 1

Views: 728

Answers (1)

meda
meda

Reputation: 45490

Your JSON is missing a quote

{"name":foo"}
        ^

So add it :

{
    "name": "foo"
}

Upvotes: 1

Related Questions