Access Denied on Mercurial Push hooks

Issue #376 resolved
Tim Scott created an issue

I'm currently evaluating SCM-Manager for our company's Mercurial repos. It looks extremely promising and was surprisingly easy to set up! I've been able to integrate things with Active Directory and know that at least for cloning and pulling, authentication is working.

My trouble is with doing an hg push. When I do that, I get the failure indicated by debugoutput_fail.txt (attached). Essentially, it's giving me an "Access Denied" error and contains the notice 'Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.' Since my username/password is working for cloning and pulling, I'm doubting my credentials are the issue.

I also see this line appear in the log:

21:19:48.878 [Thread-138] WARN sonia.scm.web.cgi.DefaultCGIExecutor - abort: pretxnchangegroup.scm hook failed

I've been able to get around this problem by modifying the repo's 'hgrc' file on the SCM-Manager server. If I comment out the following lines:

#changegroup.scm = python:scmhooks.callback
#pretxnchangegroup.scm = python:scmhooks.callback

...I can push as normal and see the output shown in debugoutput_pass.txt.

Any ideas what may be wrong? After reading some other similar issues pertaining to the log warning, I tried enabling "Force Base Url" but that didn't seem to cure my problem.

scm/api/rest/support log is also attached.


Comments (11)

  1. Sebastian Sdorra repo owner
    • changed status to open

    Could you enable trace logging and post the complete log from the start of scm-manager to the failed push. Enabling trace logging is described in the FAQ.

  2. Tim Scott reporter

    This contains the full trace from the start of the service to me trying to push (and failing). The push itself begins at timestamp 07:29:35.636.

    I've scrubbed authentication/identifying info out with the "DELETED" tag. Hopefully, this doesn't impede your analysis.

    Thanks for the quick response!

  3. Sebastian Sdorra repo owner

    Ok, i think i found the problem. The pretxnchangegroup.scm tries to call scm-manager from mercurial and it looks like it is using a proxy server for that connection. The proxy server blocks the connection with the error message from debugoutput_fail.txt.

  4. Tim Scott reporter

    Hrm. I've tried configuring the proxy server on this machine for getting the plugins going but failed so I ended up doing the manual plug-in installation thing. Are there other workarounds I could try, or is getting the proxy server configured properly my only option? I have doubts about my chance at success.

  5. Tim Scott reporter

    I've updated the proxy settings so that I can now successfully access the SCM-Manager plugins that I was unable to see before. I tried after doing this and the push still failed.

    So, I tried updating the repo's hgrc file with http_proxy host, username, and password information, hoping that would clear up the proxy issue. No luck. Things still error out with the same message.

  6. Sebastian Sdorra repo owner

    The proxy settings of scm-manager does not affect the mercurial hooks, because the hooks does not need a proxy they should only talk to the local instance of scm-manager. The problem is that python takes some global settings from the os. I will try to create a new version of scm-manager which ignores the proxy settings.

  7. Tim Scott reporter

    Sure can. I manually applied the commit you made to and it worked. I'll double-check things work with the referenced .zip file.


  8. Log in to comment