"message": "Problems parsing JSON"

Hello and Good Morning,

I am very new to GitHub. I have created an account and am trying to create a repository from Command line as follows:
curl -u Amruth-Smaragdine -d ‘{ “name” : “PythonDB” }’ https://api.github.com/user/repos

I am receiving an error and following is the output after I execute the above command:

Enter host password for user ‘Amruth-Smaragdine’:
curl: (6) Could not resolve host: name
curl: (3) Bad URL, colon is first character
curl: (6) Could not resolve host: PythonDB
curl: (3) [globbing] unmatched close brace/bracket in column 1
{
“message”: “Problems parsing JSON”,
“documentation_url”: “https://developer.github.com/v3/repos/#create
}

Can someone help me identify as to where I am going wrong?

Thanks in advance.

I figured where I have gone wrong.

The problem is not with the command, but with the Operating System and the syntax, I was following to pass on the parameters via command line.

I was executing the command from an “MS Windows 10” machine command line.

The command got successfully executed when I replaced single quotes with double quotes after -d and also have included the “Escape sequence character ( \ )” in the command which is as follows:

curl -u Amruth-Smaragdine -d “{“name” : “PythonDB” }” https://api.github.com/user/repos

1 Like