Using gerrit REST APIs

817 views
Skip to first unread message

mj

unread,
Jan 29, 2014, 1:20:45 AM1/29/14
to repo-d...@googlegroups.com
I am new to gerrit. I am using gerrit V. 2.6 . I want to use gerrit REST APIs in my python script. But not able to figure out how to use it. I tried below code but getting errors.




getting error :


<html><head>
<title>401 Authorization Required</title>
</head><body>
<h1>Authorization Required</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
</body></html>

Am I missing something.??

Matthias Sohn

unread,
Jan 29, 2014, 3:03:35 AM1/29/14
to mj, Repo and Gerrit Discussion
what's your server's authentication configuration (section auth [1]) ?


--
Matthias
Message has been deleted

mj

unread,
Jan 29, 2014, 6:12:58 AM1/29/14
to repo-d...@googlegroups.com, mj
It's LDAP

Edwin Kempin

unread,
Jan 29, 2014, 8:41:25 AM1/29/14
to mj, Repo and Gerrit Discussion
Are you using the HTTP password from the Gerrit WebUI that Gerrit generated for you?
  Settings --> HTTP Password


2014-01-29 mj <mrutyunj...@gmail.com>

--
--
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/groups/opt_out.

mj

unread,
Jan 29, 2014, 11:54:20 PM1/29/14
to repo-d...@googlegroups.com, mj
No i am not using HTTP password. Is there something wrong with my command??

Edwin Kempin

unread,
Jan 30, 2014, 2:28:18 AM1/30/14
to mj, Repo and Gerrit Discussion



2014-01-30 mj <mrutyunj...@gmail.com>

No i am not using HTTP password. Is there something wrong with my command??
If you are not using the HTTP password, then yes, it is expected that this fails.

mj

unread,
Jan 31, 2014, 12:08:57 AM1/31/14
to repo-d...@googlegroups.com, mj
What should i need to use then?? what part of command is not correct??

David Ostrovsky

unread,
Jan 31, 2014, 2:29:21 AM1/31/14
to repo-d...@googlegroups.com, mj, repo-discuss

Am Freitag, 31. Januar 2014 06:08:57 UTC+1 schrieb mj:
What should i need to use then?? what part of command is not correct??

The password is wrong. Generate HTTP password in

User => Settings => HTTP Password 

and use generated password in command.

mj

unread,
Feb 2, 2014, 8:00:31 AM2/2/14
to repo-d...@googlegroups.com, mj
Thanks David. I just tried same thing you have mentioned but still getting same error.

David Ostrovsky

unread,
Feb 2, 2014, 12:05:36 PM2/2/14
to repo-d...@googlegroups.com, mj, repo-discuss

Am Sonntag, 2. Februar 2014 14:00:31 UTC+1 schrieb mj:
Thanks David. I just tried same thing you have mentioned but still getting same error.


Works here on current master:

)]}'
{
  "Administrators": {
[...]



Reply all
Reply to author
Forward
0 new messages