Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/trac/web/api.py", line 602, in send_error data, 'text/html') File "/usr/local/lib/python2.7/dist-packages/trac/web/chrome.py", line 1111, in render_template if self.stream_filters: File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 82, in extensions components = [component.compmgr[cls] for cls in classes] File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 208, in __getitem__ component = cls(self) File "/usr/local/lib/python2.7/dist-packages/trac/core.py", line 144, in __call__ self.__init__() File "/usr/local/lib/python2.7/dist-packages/sage_trac/ticket_branch.py", line 37, in __init__ git_merger.GitMerger.__init__(self, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/sage_trac/git_merger.py", line 28, in __init__ GitBase.__init__(self, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/sage_trac/common.py", line 66, in __init__ raise TracError('one of cgit_url or cgit_hot must be set in ' TracError: one of cgit_url or cgit_hot must be set in trac.ini
AttributeError: 'FakeSession' object has no attribute 'authenticated'
There was an internal error in Trac. It is recommended that you notify your local Trac administrator with the information needed to reproduce the issue.
The action that triggered the error was:
POST: /login
TracGuide — The Trac User and Administration Guide
On Jun 22, 2016 19:12, "Volker Braun" <vbrau...@gmail.com> wrote:
>
> The authentication changed, we used to have http digest (browser popup window, with realm) and now its the trac builtin one. This breaks the git-trac script as it tries to authenticate over http digest. I can fix it up but first let me ask: Is that going to stay?
This was a requested feature.
I did worry that it could break any script that was relying on HTTP authentication but nobody indicated as much. It should be possible to login over xmlrpc or by posting to /login and storing the resulting session cookie.
Conceivably it would not be hard to provide an alternative HTTP digest backend for login as well.
Conceivably it would not be hard to provide an alternative HTTP digest backend for login as well.
On Jun 23, 2016 11:10, "Volker Braun" <vbrau...@gmail.com> wrote:
>
> I'm still getting authentication errors:
>
> xmlrpclib.Fault: <Fault 403: "TICKET_MODIFY privileges are required to perform this operation on Ticket #20581. You don't have the required permissions.">
>
> did you also add the
>
> [account-manager]
> environ_auth_overwrite = false
Yes. Let me make sure that's actually working though. Also make sure the requests are definitely going through /login/xmlrpc
> On Thursday, June 23, 2016 at 11:05:11 AM UTC+2, Erik Bray wrote:
>>
>> On Thu, Jun 23, 2016 at 10:43 AM, Erik Bray <erik....@gmail.com> wrote:
>> > On Wed, Jun 22, 2016 at 7:48 PM, Volker Braun <vbrau...@gmail.com> wrote:
>> >> On Wednesday, June 22, 2016 at 7:23:34 PM UTC+2, Erik Bray wrote:
>> >>>
>> >>> Conceivably it would not be hard to provide an alternative HTTP digest
>> >>> backend for login as well.
>> >>
>> >>
>> >> That would be the easiest solution... can you set it up?
>> >
>> > Let me take a closer look at that documentation you pointed to
>> > earlier. If I understand correctly, adding that option to the
>> > AccountManagerPlugin will allow /login/xmlrpc to be handled by the web
>> > server (where in turn I can enable htdigest authentication).
>>
>> Okay, I have re-enabled HTTP digest authentication on /login/xmlrpc as
>> before. Please let me know if that fixes things.
>> Sorry about that--I should have gone with my first instinct on it.
>>
>> Erik
>
--
On Jun 24, 2016 04:06, "David Roe" <roed...@gmail.com> wrote:
>
> I just updated git-trac-command and tried "git trac push", and got
> remote: File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
>
> remote: raise ResponseError()
> remote: xmlrpclib.ResponseError: ResponseError()
>
> Any suggestions?
See previous posts on this thread concerning HTTPS. I think someone already posted the fix to this.
It seems xmlrpclib doesn't follow redirects by default, I guess. At least certainly not from HTTP to HTTPS
On Jun 24, 2016 04:06, "David Roe" <roed...@gmail.com> wrote:
>
> I just updated git-trac-command and tried "git trac push", and got
> remote: File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
>
> remote: raise ResponseError()
> remote: xmlrpclib.ResponseError: ResponseError()
>
> Any suggestions?See previous posts on this thread concerning HTTPS. I think someone already posted the fix to this.
On Jun 24, 2016 9:22 AM, "David Roe" <roed...@gmail.com> wrote:
>
>
>
> On Fri, Jun 24, 2016 at 12:16 AM, Erik Bray <erik....@gmail.com> wrote:
>>
>> On Jun 24, 2016 04:06, "David Roe" <roed...@gmail.com> wrote:
>> >
>> > I just updated git-trac-command and tried "git trac push", and got
>> > remote: File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
>> >
>> > remote: raise ResponseError()
>> > remote: xmlrpclib.ResponseError: ResponseError()
>> >
>> > Any suggestions?
>>
>> See previous posts on this thread concerning HTTPS. I think someone already posted the fix to this.
>
>
> Are you referring to Volker's patch to git_trac/digest_transport_py2.py? That seems to have been pushed to the git-trac repository and I have it; I ran "python setup.py install" after pulling. Is there something else I'm missing?
It's possible the patch is missing something. I haven't looked at git_trac myself but from what I've seen there are inconsistencies in the URLs it uses to connect.
I noticed some code in the patchbot uses a global variable hard-coded in sage.env called TRAC_SERVER_URL. I forget off the top of my head (I'm on my phone right now) if that includes the 'http' or not. But if so any code that uses TRAC_SERVER_URL should be fixed as well.
I just updated git-trac-command and tried "git trac push", and got
remote: Traceback (most recent call last):
remote: File "./hooks/post-receive.d/01-trac_branch", line 180, in <module>
remote: for number, ticket in trac.ticket_iter(branch):
remote: File "./hooks/post-receive.d/01-trac_branch", line 75, in ticket_iter
remote: for result in self.rpc.search.branch(branch):
remote: File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__
remote: return self.__send(self.__name, args)
remote: File "/usr/lib/python2.7/xmlrpclib.py", line 1587, in __request
remote: verbose=self.__verbose
remote: File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request
remote: return self.single_request(host, handler, request_body, verbose)
remote: File "/srv/git/repositories/sage.git/hooks/post-receive.d/digest_transport.py", line 154, in single_request
remote: return self.parse_response(response)
remote: File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response
remote: return u.close()
remote: File "/usr/lib/python2.7/xmlrpclib.py", line 792, in close
remote: raise ResponseError()
remote: xmlrpclib.ResponseError: ResponseError()
To g...@trac.sagemath.org:sage.git
* [new branch] HEAD -> u/roed/p_adic_floating_point_ringsAny suggestions?
The error is from the remote side and only echo'ed locally; This is not git-trac's fault but the fault of our git post-receive hook.
Eric, is the post-receive hook still the same as in https://github.com/sagemath/trac-githooks/blob/master/post-receive.d/digest_transport.py? That file needs to have http->https fixed as indiff --git a/git_trac/digest_transport_py2.py b/git_trac/digest_transport_py2.pyindex 28a8520..c030432 100644--- a/git_trac/digest_transport_py2.py+++ b/git_trac/digest_transport_py2.py@@ -121,7 +121,7 @@ class DigestTransport(object, SafeTransport):try:import urlparsereq = urllib2.Request(- urlparse.urlunparse(('http', host, handler, '', '', '')),+ urlparse.urlunparse(('https', host, handler, '', '', '')),request_body, {'Content-Type': 'text/xml','User-Agent': self.user_agent})response = self.opener.open(req)
On Friday, June 24, 2016 at 6:23:12 PM UTC+1, Volker Braun wrote:The error is from the remote side and only echo'ed locally; This is not git-trac's fault but the fault of our git post-receive hook.
Eric, is the post-receive hook still the same as in https://github.com/sagemath/trac-githooks/blob/master/post-receive.d/digest_transport.py? That file needs to have http->https fixed as indiff --git a/git_trac/digest_transport_py2.py b/git_trac/digest_transport_py2.pyindex 28a8520..c030432 100644--- a/git_trac/digest_transport_py2.py+++ b/git_trac/digest_transport_py2.py@@ -121,7 +121,7 @@ class DigestTransport(object, SafeTransport):try:import urlparsereq = urllib2.Request(- urlparse.urlunparse(('http', host, handler, '', '', '')),+ urlparse.urlunparse(('https', host, handler, '', '', '')),request_body, {'Content-Type': 'text/xml','User-Agent': self.user_agent})response = self.opener.open(req)I have just applied this patch by hand, and it has fixed things for me - so I can push, no error messages, the commit gets updated on the trac page (see https://trac.sagemath.org/ticket/20659)