1. Marcin Kuzminski
  2. RhodeCode
  3. Issues

Issues

Issue #672 resolved

hg pull 403 HTTP Forbidden for a repo admin from a certain machine

Alexandr Altinchurin
created an issue

We have a large repo tree in RhodeCode, and sometimes some repos become unaccessible by certain users from certain machines. RhodeCode server runs under Windows Server 2008.

This problem repo can be accessed via RhodeCode web interface, but the same user cannot pull it via TortoiseHg from his PC. This user can even be the repo admin, but she/he still gets a 403 Forbidden error, while the other repos can be pushed/pulled as always. RhodeCode log shows:

2012-12-05 15:45:19.651 ERROR [rhodecode.lib.auth] Exception while accessing permissions Traceback (most recent call last):
  File "D:\Python27\lib\site-packages\rhodecode\lib\auth.py", line 800, in __call__
    self.user_perms = set([usr.permissions['repositories'][repo_name]])
KeyError: u'Plugins/Rheo'

But at the same time the same user can successfully pull this repo from another machine.

Comments (5)

  1. Marcin Kuzminski repo owner

    This is very strange. I have few questions

    What does it mean a large repo tree ? Are those repos that become inaccessible are always repos inside a group ? Also the issue always related to TortoiseHG ? or is it happening also form hg client ?

    If it's not reproducible, maybe you can try to debug it it putting a

    print usr
    print usr.permissions
    

    statements before self.user_perm = set... statement, and see what do you have there.

  2. Alexandr Altinchurin reporter

    What does it mean a large repo tree ? Are those repos that become inaccessible are always repos inside a group ?

    Our repo tree is 405 repos in 71 groups. Only 8 repos are in "root group", and there were no problems with these 8 yet.

    Also the issue always related to TortoiseHG ? or is it happening also form hg client ?

    Hg pull gives the same 403 Forbidden as TortoiseHg.

    maybe you can try to debug it it putting a print statements before self.user_perm = set... statement

    OK, I've done it. That generates an enormous amount of information. The logs are here: https://www.dropbox.com/s/dojymy1erq0gym3/large_error.zip One file is log of "hg pull problem repo", the other is "hg pull other repo by the same user"

  3. Marcin Kuzminski repo owner

    The problem i found now is that there's a key named PlugIns/Rheo with proper permissions, while the keyerror is on Plugins/Rheo. Do you have an idea why it's like that ? clients request wrong repository name somehow ?

  4. Alexandr Altinchurin reporter

    It's great, thank you! Really, those users who had problems have "wrong" paths in their hgrc files, for example http://rhodecode/Plugins/Rheo in hgrc file and http://rhodecode/PlugIns/Rheo actually in RhodeCode.

  5. Log in to comment