post-review fails to login / uses wrong URL

240 views
Skip to first unread message

Joachim Worringen

unread,
Jun 3, 2010, 4:34:26 AM6/3/10
to reviewboard
Greetings,

I've set up reviewboard 1.0.8 successfully (apache/mod_python/
postgresql). All on Linux (FC12). Now, post-review fails to work as
expected:

[joachim@testsrv perf]$ post-review --version
RBTools 0.2
[joachim@testsrv perf]$ post-review -d --server=testsrv/reviews
>>> svn info
>>> git rev-parse --git-dir
>>> hg root
>>> hg svn info
>>> repository info: Path: ssh://h...@192.168.10.168/perf, Base path: , Supports changesets: False
>>> hg diff
>>> Looking for ' testsrv/reviews/' cookie in /home/joachim/.post-review-cookies.txt
>>> Couldn't load cookie file: [Errno 2] No such file or directory: '/home/joachim/.post-review-cookies.txt'
==> Review Board Login Required
Enter username and password for Review Board at testsrv/reviews/
Username: joachim
Password:
>>> Logging in with username "joachim"
>>> HTTP POSTing to http://testsrv/reviews/testsrv/reviews/api/json/accounts/login/: {'username': 'joachim', 'password': '**************'}

>>> Got HTTP error: 404: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

Obviously, the URL is incorrect: the server string "testsrv/reviews"
is repeated.

I tried to configure the server via ~.reviewboardrc, but this fails
as well:

[joachim@testsrv perf]$ cat ~/.reviewboardrc
REVIEWBOARD_URL=http://testsrv/reviews
[joachim@testsrv perf]$ post-review -d
Syntax error in config file: /home/joachim/.reviewboardrc
Line 1 offset 21

Any ideas on how to fix this?

thanks, Joachim

Christian Hammond

unread,
Jun 3, 2010, 4:48:49 AM6/3/10
to revie...@googlegroups.com
The value passed to --server must be a full URL, not just a file path.

Christian

--
Christian Hammond - chi...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com



--
Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to reviewboard...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

Joachim Worringen

unread,
Jun 12, 2010, 11:08:02 AM6/12/10
to reviewboard
On 3 Jun., 10:48, Christian Hammond <chip...@chipx86.com> wrote:
> The value passed to --server must be a full URL, not just a file path.

Thanks, Christian, using --server=http://testsrv/reviews actually
helped.

But I still wonder why the incomplete URL "testsrv/reviews" is then
expanded to http://testsrv/reviews/testsrv/reviews/ - it seems
http://testsrv/reviews is prepended, but where does it get this URL
from?

Also, where is the problem with the rc-file shown below (from my
original posting):

[joachim@testsrv perf]$ cat ~/.reviewboardrc
REVIEWBOARD_URL=http://testsrv/reviews
[joachim@testsrv perf]$ post-review -d
Syntax error in config file: /home/joachim/.reviewboardrc
Line 1 offset 21

[...]
> > [joachim@testsrv perf]$ post-review  -d --server=testsrv/reviews
[...]

Christian Hammond

unread,
Jun 12, 2010, 3:30:59 PM6/12/10
to revie...@googlegroups.com
Hi,

We're using Python's URL building functions for building that path. I
don't know why it was built that way. We should probably do some
validation for that (care to file a bug?)

As for the config file, .reviewboardrc is actually a Python file, so
it must use Python syntax. That means in this case that it needs
quotes around the URL.

Christian

> --
> Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/
> Happy user? Let us know at http://www.reviewboard.org/users/
> -~----------~----~----~----~------~----~------~--~---
> To unsubscribe from this group, send email to reviewboard...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en

--

Reply all
Reply to author
Forward
0 new messages