Re: SVN post-commit hook for RB - problem logging into RB site via http authentication
This is the simplest patch: 261,262c261,262 self.rb_user = None self.rb_pass = None --- self.rb_user = options.http_username self.rb_pass = options.http_password 2639a2640,2646 parser.add_option(--http-username, dest=http_username, default=None, metavar=USERNAME, help='the username for basic HTTP authentication') parser.add_option(--http-password, dest=http_password, default=None, metavar=PASSWORD, help='the password for basic HTTP authentication') On Feb 24, 10:58 pm, Christian Hammond chip...@chipx86.com wrote: Hi, The --username and --password parameters are only for the user on Review Board. It doesn't handle HTTP authentication. I'd be perfectly happy to accept a patch that adds --http-username and --http-password. Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Wed, Feb 24, 2010 at 11:33 AM, Stodge sto...@gmail.com wrote: I wonder if post-review could be modified: class ReviewBoardHTTPPasswordMgr(urllib2.HTTPPasswordMgr): Adds HTTP authentication support for URLs. Python 2.4's password manager has a bug in http authentication when the target server uses a non-standard port. This works around that bug on Python 2.4 installs. This also allows post-review to prompt for passwords in a consistent way. See:http://bugs.python.org/issue974757 def __init__(self, reviewboard_url): self.passwd = {} self.rb_url = reviewboard_url self.rb_user = options.username self.rb_pass = options.password On Feb 24, 1:45 pm, Stodge sto...@gmail.com wrote: My review board site is protected by Apache's basic authentication. So when I run the SVN post-commit hook for review board (from RBTools) it's asking me for a username/password to login to the RB site. I thought this was all taken care of by the post-review script? Or does that only handle logging into RB directly - i.e. not via http authentication? /usr/bin/post-review --repository-url=http://localhost/repos/fred-- username=admin --password=admin -p --submit-as=mike --revision- range=4:5 --server=http://localhost/reviews/fred; --summary=refs #1 publish review == Review Board Login Required Enter username and password for Review Board athttp://localhost/reviews/fred/ == HTTP Authentication Required Enter username and password for Restricted at localhost Username: ... Thanks -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SVN post-commit hook for RB - problem logging into RB site via http authentication
I created an enhancement request http://code.google.com/p/reviewboard/issues/detail?id=1514 with an attached patch. First ever patch so be kind! On Feb 25, 7:43 am, Stodge sto...@gmail.com wrote: This is the simplest patch: 261,262c261,262 self.rb_user = None self.rb_pass = None --- self.rb_user = options.http_username self.rb_pass = options.http_password 2639a2640,2646 parser.add_option(--http-username, dest=http_username, default=None, metavar=USERNAME, help='the username for basic HTTP authentication') parser.add_option(--http-password, dest=http_password, default=None, metavar=PASSWORD, help='the password for basic HTTP authentication') On Feb 24, 10:58 pm, Christian Hammond chip...@chipx86.com wrote: Hi, The --username and --password parameters are only for the user on Review Board. It doesn't handle HTTP authentication. I'd be perfectly happy to accept a patch that adds --http-username and --http-password. Christian -- Christian Hammond - chip...@chipx86.com Review Board -http://www.reviewboard.org VMware, Inc. -http://www.vmware.com On Wed, Feb 24, 2010 at 11:33 AM, Stodge sto...@gmail.com wrote: I wonder if post-review could be modified: class ReviewBoardHTTPPasswordMgr(urllib2.HTTPPasswordMgr): Adds HTTP authentication support for URLs. Python 2.4's password manager has a bug in http authentication when the target server uses a non-standard port. This works around that bug on Python 2.4 installs. This also allows post-review to prompt for passwords in a consistent way. See:http://bugs.python.org/issue974757 def __init__(self, reviewboard_url): self.passwd = {} self.rb_url = reviewboard_url self.rb_user = options.username self.rb_pass = options.password On Feb 24, 1:45 pm, Stodge sto...@gmail.com wrote: My review board site is protected by Apache's basic authentication. So when I run the SVN post-commit hook for review board (from RBTools) it's asking me for a username/password to login to the RB site. I thought this was all taken care of by the post-review script? Or does that only handle logging into RB directly - i.e. not via http authentication? /usr/bin/post-review --repository-url=http://localhost/repos/fred-- username=admin --password=admin -p --submit-as=mike --revision- range=4:5 --server=http://localhost/reviews/fred; --summary=refs #1 publish review == Review Board Login Required Enter username and password for Review Board athttp://localhost/reviews/fred/ == HTTP Authentication Required Enter username and password for Restricted at localhost Username: ... Thanks -- Want to help the Review Board project? Donate today at http://www.reviewboard.org/donate/ Happy user? Let us know athttp://www.reviewboard.org/users/ -~--~~~~--~~--~--~--- To unsubscribe from this group, send email to reviewboard+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SVN post-commit hook for RB - problem logging into RB site via http authentication
I wonder if post-review could be modified: class ReviewBoardHTTPPasswordMgr(urllib2.HTTPPasswordMgr): Adds HTTP authentication support for URLs. Python 2.4's password manager has a bug in http authentication when the target server uses a non-standard port. This works around that bug on Python 2.4 installs. This also allows post-review to prompt for passwords in a consistent way. See: http://bugs.python.org/issue974757 def __init__(self, reviewboard_url): self.passwd = {} self.rb_url = reviewboard_url self.rb_user = options.username self.rb_pass = options.password On Feb 24, 1:45 pm, Stodge sto...@gmail.com wrote: My review board site is protected by Apache's basic authentication. So when I run the SVN post-commit hook for review board (from RBTools) it's asking me for a username/password to login to the RB site. I thought this was all taken care of by the post-review script? Or does that only handle logging into RB directly - i.e. not via http authentication? /usr/bin/post-review --repository-url=http://localhost/repos/fred-- username=admin --password=admin -p --submit-as=mike --revision- range=4:5 --server=http://localhost/reviews/fred; --summary=refs #1 publish review == Review Board Login Required Enter username and password for Review Board athttp://localhost/reviews/fred/ == HTTP Authentication Required Enter username and password for Restricted at localhost Username: ... Thanks -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en
Re: SVN post-commit hook for RB - problem logging into RB site via http authentication
Hi, The --username and --password parameters are only for the user on Review Board. It doesn't handle HTTP authentication. I'd be perfectly happy to accept a patch that adds --http-username and --http-password. Christian -- Christian Hammond - chip...@chipx86.com Review Board - http://www.reviewboard.org VMware, Inc. - http://www.vmware.com On Wed, Feb 24, 2010 at 11:33 AM, Stodge sto...@gmail.com wrote: I wonder if post-review could be modified: class ReviewBoardHTTPPasswordMgr(urllib2.HTTPPasswordMgr): Adds HTTP authentication support for URLs. Python 2.4's password manager has a bug in http authentication when the target server uses a non-standard port. This works around that bug on Python 2.4 installs. This also allows post-review to prompt for passwords in a consistent way. See: http://bugs.python.org/issue974757 def __init__(self, reviewboard_url): self.passwd = {} self.rb_url = reviewboard_url self.rb_user = options.username self.rb_pass = options.password On Feb 24, 1:45 pm, Stodge sto...@gmail.com wrote: My review board site is protected by Apache's basic authentication. So when I run the SVN post-commit hook for review board (from RBTools) it's asking me for a username/password to login to the RB site. I thought this was all taken care of by the post-review script? Or does that only handle logging into RB directly - i.e. not via http authentication? /usr/bin/post-review --repository-url=http://localhost/repos/fred-- username=admin --password=admin -p --submit-as=mike --revision- range=4:5 --server=http://localhost/reviews/fred; --summary=refs #1 publish review == Review Board Login Required Enter username and password for Review Board athttp://localhost/reviews/fred/ == HTTP Authentication Required Enter username and password for Restricted at localhost Username: ... Thanks -- 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+unsubscr...@googlegroups.comreviewboard%2bunsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/reviewboard?hl=en