Gitlab Server Couldn't Understand My Curl PUT request,Why?
I generated Personal Token from gitlab settings and now my requirement is simple, with below curl command, i want to update gitlab file named input-gameinput.json which is placed at private GitLab repository below
https://code.abc.cloud/lots/master/src/gatling/resources/data/input-gameinput.json
here is content of above repo
[
{
"url": "https://api.url/Organizations/",
"user":100,
"testDuration":60,
"rampDuration":5,
"name": "Perf Test Org",
"roundStart":"2019-04-15T20:22:23.409Z","roundEnd":"2019-04-
15T20:22:23.409Z","currentTime":"2019-04-
}
]
Now on issuing curl command using my private gitlab token
curl --request PUT --header "PRIVATE-TOKEN: SOMETOKEN" --header "Content-Type: application/json" --data '{ "ref": "master", "variables": [ {"key": "user", "value": "50"}, {"key": "testDuration", "value": "60"} ] }' " https://code.abc.cloud/lots/master/src/gatling/resources/data/input-gameinput.json"
i get errors in console
C:\WINDOWS\system32>curl --request PUT --header "PRIVATE-TOKEN:
SOMETOKEN"
--header "Content-Type: application/json" --data '{ "ref":
"master",
"variables": [ {"key": "user", "value": "50"}, {"key": "testDuration",
"value": "60"} ] }'
https://code.abc.cloud/lots/master/src/gatling/resources/data/input-gameinput.json"
curl: (6) Could not resolve host: ref
curl: (6) Could not resolve host: master,
curl: (6) Could not resolve host: variables
curl: (3) [globbing] bad range specification in column 2
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: user,
curl: (6) Could not resolve host: value
curl: (3) [globbing] unmatched close brace/bracket in column 3
curl: (3) [globbing] unmatched brace in column 1
curl: (6) Could not resolve host: testDuration,
curl: (6) Could not resolve host: value
curl: (3) [globbing] unmatched close brace/bracket in column 3
curl: (3) [globbing] unmatched close brace/bracket in column 1
curl: (3) [globbing] unmatched close brace/bracket in column 1
curl: (6) Could not resolve host: code.abc.cloud
Edited by Tarun Das