Hello, Aaron.

Yes the solution provided over at superuser.com feasible in my opinion. 
I appeal the the RBTools developers again. Could there be a workaround 
added to the tools so that Automatic Post-Commit reviews are possible with 
"protected"(authentication & authorization) SVN instances?

I see another workaround - to have a svn mirror running with no 
authentication, but it makes no sense not to have authentication & 
authorization possibilities.

Regards, 
   Borislav.

On Friday, 12 October 2012 02:39:33 UTC+3, Aaron Bruce wrote:
>
> Chiming in here with the same issue. It's definitely an svn prompt for a 
> svn username/password. I was trying to comment on your superuser post but 
> I'm not a pro enough superuser user :-)
>
> The solution posted there is bad, he suggests logging into the www-data 
> user and caching your svn credentials. That requires making a www-data svn 
> user and then caching credentials for every single repo you want to use 
> post-review with.
>
> On Thursday, October 4, 2012 12:29:20 AM UTC-7, Borislav Sabev wrote:
>>
>> Also if there could be some kind of flag to tell the *post-review* command 
>> that this repository is local to run the *svn info* command with:
>> *svn info file:///path/to/repo* ?
>>
>> Then svn info would not ask for a password since authentication is set 
>> only on the web access part?
>>
>> On Thursday, 4 October 2012 10:24:23 UTC+3, Borislav Sabev wrote:
>>>
>>> Hello again.
>>> I found what command is causing the problem. Here is some ps (BSD 
>>> syntax) output:
>>>
>>> *www-data 10259  2.5  0.2  40540  9864 pts/1    S+   09:56   0:00 
>>> /usr/bin/python /usr/local/bin/post-review --repository-url=http://**
>>> xxx.**xxx.**xxx.**xxx**/svn/testRepo2 --revision-range=1:2 --server=
>>> http://reviews.innovity.test/ --username=reviewposter --password=xxxxx 
>>> --submit-as=borislav -p --target-groups=reviewers --debug*
>>> *www-data 10271  0.4  0.0      0     0 pts/1    Z+   09:56   0:00 [svn] 
>>> <defunct>*
>>> *www-data 10272  0.4  0.0 113280  3884 pts/1    S+   09:56   0:00 svn 
>>> info http://xxx.xxx.xxx.xxx/svn/testRepo2*
>>> *www-data 10273  0.0  0.1 270844  6476 ?        S    09:56   0:00 
>>> /usr/sbin/apache2 -k start*
>>> *root     10279  0.0  0.0  19396  1184 pts/0    R+   09:56   0:00 ps aux
>>> *
>>>
>>> Since the repo hast mod-authz-svn, mod-dav-svn enabled and 
>>> authentication running it asks for a password for the www-data user:
>>>
>>> *>>> RBTools 0.4.1*
>>> *>>> Home = /home/borislav*
>>> *Password for 'www-data': <== THIS IS ACTUALLY CALLED BY `svn info`*
>>>
>>> This still happens if I run the post-review command with *--http-username= 
>>> --http-password= options set.*
>>> *
>>> *
>>> *So should this now be considered a bug? That there is no option to set 
>>> authentication parameters for a remote SVN repo so that handling could be 
>>> automatic?*
>>> *
>>> *
>>> Regards, 
>>>     Borislav.
>>>
>>> On Tuesday, 25 September 2012 16:23:06 UTC+3, Borislav Sabev wrote:
>>>>
>>>> Hello all.
>>>>
>>>> I have a dull problem that I can't seem to solve.
>>>>
>>>> *What am I trying to do?*
>>>> I am trying to do:
>>>> *post-review 
>>>> --repository-url=http://xxx.xxx.xxx.xxx/svn/testRepo2--revision-range=6:7 
>>>> --server=
>>>> http://reviews.example.test/ --username=reviewposter 
>>>> --password=mydullpass --submit-as=admin -p --target-groups=reviewers*
>>>> All is alright when I try this from bash logged in as my user. Review 
>>>> is posted, published, etc. ==> All permissions and other miscellaneous 
>>>> settings are OK.
>>>>
>>>> *What happens when I try this from SVN's post-commit hook?*
>>>> The resources are commited but the svn operation hangs - actually the 
>>>> post-commit hook does not finish.
>>>>
>>>> *What is the problem?*
>>>> post-review seems to get the user that is executing it and tries to log 
>>>> it in. The user that's executing it is www-data (apache user) I.e. when I 
>>>> run the command as www-data:
>>>> *sudo -u www-data post-review --repository-url=**
>>>> http://xxx.xxx.xxx.xxx/svn/testRepo2** --revision-range=6:7 **--server=
>>>> http://reviews.example.test/** --username=reviewposter --password=**
>>>> mydullpass**! --submit-as=admin -p --target-groups=reviewers -d*
>>>> *
>>>> *
>>>> I get (notice the -d parameter in the post-review command - DEBUG):
>>>> *>>> RBTools 0.4.1*
>>>> *>>> Home = /home/borislav*
>>>> *Password for 'www-data':*
>>>>
>>>> This is where it hangs waiting for a password to be entered. The commit 
>>>> operation cannot finish and it just stays there. On the other hand when I 
>>>> do the same command with debug output but as myuser I get:
>>>> *>>> RBTools 0.4.1*
>>>> *>>> Home = /home/borislav*
>>>> *>>> HTTP GETting api/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/info/*
>>>> *>>> Using the new web API*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/1/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/1/info/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/2/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/2/info/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/3/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/3/info/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/4/*
>>>> *>>> HTTP GETting http://reviews.example.test/api/repositories/4/info/*
>>>> *>>> Attempting to create review request on 
>>>> http://xxx.xxx.xxx.xxx/svn/testRepo2 for None*
>>>> *>>> Submitting the review request as admin*
>>>> *>>> HTTP POSTing to http://reviews.example.test/api/review-requests/: 
>>>> {'submit_as': 'admin', 'repository': '
>>>> http://xxx.xxx.xxx.xxx/svn/testRepo2'}*
>>>> *>>> Review request created*
>>>> *>>> Attempting to set field 'target_groups' to 'reviewers' for review 
>>>> request '22'*
>>>> *>>> HTTP PUTting to 
>>>> http://reviews.example.test/api/review-requests/22/draft/: 
>>>> {'target_groups': 'reviewers'}*
>>>> *>>> Uploading diff, size: 2316*
>>>> *>>> HTTP POSTing to 
>>>> http://reviews.example.test/api/review-requests/22/diffs/: {'basedir': 
>>>> '/'}*
>>>> *>>> Publishing*
>>>> *>>> HTTP PUTting to 
>>>> http://reviews.example.test/api/review-requests/22/draft/: {'public': 
>>>> 1}*
>>>> *Review request #22 posted.*
>>>> *
>>>> *
>>>> *http://reviews.example.test/r/22/*
>>>> *
>>>> *
>>>> So actually everything with the posting/publishing etc. works.
>>>>
>>>> One solution I thought of is to execute the command as my user from the 
>>>> post-commit hook but that seems out-stretched and ugly to me.
>>>> Are there any other solutions?
>>>>
>>>> Thanks, 
>>>>     Borislav.
>>>>
>>>
> Connect with us on twitter <http://twitter.com/cardinalpath>, 
> google+<https://plus.google.com/108076800625872227241/posts>
> , facebook <http://www.facebook.com/CardinalPath>, or 
> linkedin<http://www.linkedin.com/company/cardinal-path>
> .
>
> Catch our next training in Houston Oct 8 - 12 <http://cpath.it/K2URLT>, 
> Berkeley 
> Oct 22 - 26 <http://cpath.it/IYY9oE>, Seattle Oct 29 - Nov 
> 2<http://cpath.it/JqF1xQ>
> , Phoenix Nov 12 - 16 <http://cpath.it/IJMEhB> or See 
> All<http://cpath.it/Jkrs3s>
> .
>
> This email, including any attachments, is for the sole use of the intended 
> recipient and may contain confidential information. If you are not the 
> intended recipient, please immediately notify us by reply email or by 
> telephone, delete this email and destroy any copies. Thank you.
>
>

-- 
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

Reply via email to