I ran into similar 401 issues with a gitweb hosted repo behinds basic https auth and RB 1.7.9. My solution was the local mirror and */5 cron job to keep it up to date:
http://www.reviewboard.org/docs/manual/dev/admin/configuration/repositories/#local-clone While this feels a bit 'janky' to me, it works well enough for the current consumers. Walt Javins From: [email protected] [mailto:[email protected]] On Behalf Of Thomas Dahlin Sent: Thursday, December 19, 2013 8:08 AM To: [email protected] Subject: Re: git config issues Hi Christian, Nah, I can't get it to work. I tried entering the credentials in the Username and Password fields. I also had to add hb=HEAD to the raw file URL mask to be able to use a browser to get the info. I have now: Hosting service: (None - Custom Repository) Repository type: Git Path: [email protected]:projectname.git<mailto:[email protected]:projectname.git> Raw file URL mask: https://servername/?p=projectname.git;a=blob;f=<filename>;h=<revision>;hb=HEAD Username: <username> Password: <password> Still getting "HTTP Error 401: Authorization Required" in the RB server logs It doesn't feel like RB is providing the entered username/password information... Giving up. I didn't think I was going to spend THIS much time just configuring this (what appears to be a) great tool! If any of you guys have any good ideas I'm more than willing to try them out. I'm all out of ideas. Thanks in advance! /Thomas On Tuesday, December 10, 2013 6:08:32 PM UTC+1, Thomas Dahlin wrote: I am currently trying to setup RB version 1.7.19 on a Ubuntu machine to evaluate the tool in our organisation. I am currently stuck at getting the git integration properly configured. This is my what I have entered (fake values marked with yellow) Hosting service: (None - Custom Repository) Repository type: Git Path: [email protected]:projectname.git<mailto:[email protected]:projectname.git> Raw file URL mask: https://servername/?p=projectname.git;a=blob;f=<filename>;h=<revision> ------------------------ Executing this on the local win machine: $ rbt post -d --tracking-branch=topics/branch/name DEBUG:root:Checking for a Subversion repository... DEBUG:root:Checking for a Git repository... DEBUG:root:Running: git rev-parse --git-dir DEBUG:root:Running: git config core.bare DEBUG:root:Running: git rev-parse --show-toplevel DEBUG:root:Running: git symbolic-ref -q HEAD DEBUG:root:Running: git config --get git-p4.port DEBUG:root:Command exited with rc 1: ['git', 'config', '--get', 'git-p4.port'] --- DEBUG:root:Running: git config --get branch.topics/branch/name.merge DEBUG:root:Running: git config --get branch.topics/branch/name.remote DEBUG:root:Running: git config --get remote.origin.url DEBUG:root:repository info: Path: [email protected]:projectname.git<mailto:[email protected]:projectname.git>, Base path: , Supports changesets: False DEBUG:root:Making HTTP GET request to http://<RB<http://%3cRB> server>/api/ DEBUG:root:Making HTTP GET request to http://<RB<http://%3cRB> server>/api/info/ DEBUG:root:Running: git merge-base origin/topics/branch/name refs/heads/topics/branch/name DEBUG:root:Running: git diff --no-color --full-index --no-ext-diff --ignore-submodules --no-renames <revision>..refs/heads/topics/branch/name -M DEBUG:root:Making HTTP GET request to http://<RB<http://%3cRB> server>/api/review-requests/ DEBUG:root:Making HTTP POST request to http://<RB<http://%3cRB> server>/api/review-requests/ DEBUG:root:Making HTTP GET request to http://<RB<http://%3cRB> server>/api/review-requests/1/diffs/ DEBUG:root:Making HTTP POST request to http://<RB<http://%3cRB> server>/api/review-requests/1/diffs/ DEBUG:root:Got API Error 207 (HTTP code 400): The file was not found in the repository DEBUG:root:Error data: {u'stat': u'fail', u'file': u'<filename>', u'err': {u'msg': u'The file was not found in the repository', u'code': 207}, u'revision': u'<revision>'} Traceback (most recent call last): File "c:\Python27\Scripts\rbt-script.py", line 9, in <module> load_entry_point('RBTools==0.5.2', 'console_scripts', 'rbt')() File "C:\Python27\lib\site-packages\rbtools-0.5.2-py2.7.egg\rbtools\commands\main.py", line 106, in main File "C:\Python27\lib\site-packages\rbtools-0.5.2-py2.7.egg\rbtools\commands\__init__.py", line 157, in run_from_argv File "C:\Python27\lib\site-packages\rbtools-0.5.2-py2.7.egg\rbtools\commands\post.py", line 511, in main File "C:\Python27\lib\site-packages\rbtools-0.5.2-py2.7.egg\rbtools\commands\post.py", line 390, in post_request rbtools.commands.CommandError: Error uploading diff The file was not found in the repository (HTTP 400, API Error 207) Your review request still exists, but the diff is not attached. ------------------ RB logs: DEBUG - - userauth is OK DEBUG - - Debug msg: Forced command: gitosis-serve xxxxxxxx DEBUG - - Debug msg: Port forwarding disabled. DEBUG - - Debug msg: X11 forwarding disabled. DEBUG - - Debug msg: Agent forwarding disabled. DEBUG - - Debug msg: Pty allocation disabled. INFO - - Authentication (publickey) successful! DEBUG - - EOF in transport thread INFO - - Fetching file from https://servername/?p=projectname.git;a=blob;f=<filename>;hb=<revision> ERROR - - HTTP error code 401 when fetching file from https://servername/?p=projectname.git;a=blob;f=<filename>;h=<revision>: HTTP Error 401: Authorization Required ------------------- I found someone reported a similar issue: https://code.google.com/p/reviewboard/issues/detail?id=3058 If I try setting the Raw file URL mask as suggested in #9 ("You can encode these in the URL as https://username:password@myServerAddress/"), I get the following error (on the RB server): ERROR - - Unexpected error fetching file from https://username:password@servername/?p=projectname.git;a=blob;f=<filename>;h=<revision<https://username:password@servername/?p=projectname.git;a=blob;f=%3cfilename%3e;h=%3crevision>>: nonnumeric port: 'password@servername' Thanks in advance! I really want to get this up and running! -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ --- Happy user? Let us know at http://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. For more options, visit https://groups.google.com/groups/opt_out. -- Get the Review Board Power Pack at http://www.reviewboard.org/powerpack/ --- Sign up for Review Board hosting at RBCommons: https://rbcommons.com/ --- Happy user? Let us know at http://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
