Issue using REST API set-review command

46 views
Skip to first unread message

Ishan Girdhar

unread,
Jun 9, 2014, 8:59:51 AM6/9/14
to repo-d...@googlegroups.com

Hi,

I am trying to set review through REST API using set-review command[1], but we are getting 'Authentication required' message.

I am executing this command:

$ curl -X POST http://localhost:8080/changes/p1~master~I95d0c824f316d93e7072391dfeac3147e7469486/reviewers
Authentication required.I

[1] https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#set-review

Please suggest.

Thanks,
Ishan

Matthias Sohn

unread,
Jun 9, 2014, 9:15:29 AM6/9/14
to Ishan Girdhar, Repo and Gerrit Discussion
Pass a username using the -u option and add --anyauth to let curl pick the most
secure authentication method supported by the server. Or put your credentials
into ~/.netrc and add the option -n.


--
Matthias

Edwin Kempin

unread,
Jun 9, 2014, 9:28:08 AM6/9/14
to Matthias Sohn, Ishan Girdhar, Repo and Gerrit Discussion
As described in [1] you also must include the "/a" prefix in the URL to trigger the authentication.

[1] https://gerrit-review.googlesource.com/Documentation/rest-api.html#authentication


--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages