I am trying to setup Rest API for gerrit trigger jenkins plugin. I have created a service user in git.
But now when i am entering the http username/password for service user and pressing test connection . I am getting Http connection unauthorized connection.
HTTP password is nothing but the SSH public key added in the gerrit config UI.
Best Regards, Saurav
Try something like this:
Copy repository using http (command below)
git clone http://gerrituser:httppassword@gerrit_url/p/nameofproject.git
If you want use JSON file try this example command,create file body.json:
curl -H "Content-Type: application/json" -X POST --data @body.json http://gerrituser:httppassword@gerrit_url/a/changes/Change_Id/revisions/commit/review
JSON files and rest command of Gerrit REST API you can find here: https://gerrit-review.googlesource.com/Documentation/rest-api.html
ps. the letters /a/ and /p/ are necessary, remember of user permission and HTTP password should be without slash.