Issue #352 resolved

Having to authenticate 3 times in a row

Anonymous created an issue

When pushing/pulling to a login/password protected svn server, I am being asked to enter my username and password three times in a row.

Example output is:

{{{ % hg --repository V:\Development push https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk pushing to https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk http authorization required realm: Subversion Repositories http authorization required realm: Subversion Repositories http authorization required realm: Subversion Repositories searching for changes ... }}}

This has been happening for quite some time now, the versions I tested today were:

TortoiseHg 2.4 HgSubversion Rev 910 "Ignore invalid utf8 in commit messages"

TortoiseHg 2.1.4 HgSubversion Rev 910 "Ignore invalid utf8 in commit messages"

Comments (5)

  1. FlorianGeorge

    I tried with --debug --trace to get more info:

    V:\Development>hg push --debug --trace
    pushing to https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk
    using https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk
    sending capabilities command
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    http authorization required
    realm: Subversion Repositories
    user: george
    password:
    http auth: user george, password ******
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    http auth: user george, password ******
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    requested URL: 'https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk?cmd=capabilities'
    sending between command
    sending capabilities command
    http auth: user george, password ******
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    requested URL: 'https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk/?cmd=capabilities'
    capabilities: none
    http auth: user george, password ******
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    requested URL: 'https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk/?cmd=between&pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000'
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    http authorization required
    realm: Subversion Repositories
    user: george
    password:
    http auth: user george, password ******
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    http authorization required
    realm: Subversion Repositories
    user: george
    password:
    http auth: user george, password ******
    xxx.xxx.xxx.xxx certificate matched fingerprint a:b:c
    Traceback (most recent call last):
      File "V:\Tools, Libraries, Ressources\SVN & CVS Tools\hgsubversion\hgsubversion\svnrepo.py", line 180, in instance
      File "mercurial\httprepo.pyo", line 247, in instance
    RepoError: 'https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk/' does not appear to be an hg repository:
    ---%<--- (text/xml)
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="/svnindex.xsl"?>
    <!DOCTYPE svn [
      <!ELEMENT svn   (index)>
      <!ATTLIST svn   version CDATA #REQUIRED
                      href    CDATA #REQUIRED>
      <!ELEMENT index (updir?, (file | dir)*)>
      <!ATTLIST index name    CDATA #IMPLIED
                      path    CDATA #IMPLIED
                      rev     CDATA #IMPLIED
                      base    CDATA #IMPLIED>
      <!ELEMENT updir EMPTY>
      <!ELEMENT file  EMPTY>
      <!ATTLIST file  name    CDATA #REQUIRED
                      href    CDATA #REQUIRED>
      <!ELEMENT dir   EMPTY>
      <!ATTLIST dir   name    CDATA #REQUIRED
                      href    CDATA #REQUIRED>
    ]>
    <svn version="1.6.17 (r1128011)"
         href="http://subversion.tigris.org/">
      <index rev="14207" path="/trunk" base="CCDev">
        <updir />
        <dir name="A" href="A/" />
        <dir name="B" href="B/" />
        <dir name="C" href="C/" />
        <dir name="D" href="D/" />
        <dir name="E" href="E/" />
        <dir name="F" href="F/" />
        <dir name="G" href="G/" />
      </index>
    </svn>
    
    ---%<---
    
    (falling back to Subversion support)
    
  2. FlorianGeorge
    • changed status to new

    I would have been surprised if this would have helped in my case, considering I had an issue with using svn+https already a year ago: https://bitbucket.org/tortoisehg/thg/issue/905/repository-not-found-in-21-nightly

    TortoiseHg output with svn+http:

    % hg --repository V:\Development pull --verbose svn/CCDev/trunk
    repository svn/CCDev/trunk not found
    [command returned code 255 Wed Jun 13 13:45:08 2012]
    Development% 
    

    As you can see, the whole svn+https://xxx.xxx.xxx.xxx:xxxx/ part before the "svn" directory is cut off, maybe because it's called "svn".

    Using svn+https might help with the 3 times authenticating, but for me, it's broken.

    Tested it with Version 2.1.4 and Version 2.4.1, same result.

    After removing the svn+https again, it's back to "normal":

    % hg --repository V:\Development pull --verbose https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk
    http authorization required
    realm: Subversion Repositories
    http authorization required
    realm: Subversion Repositories
    http authorization required
    realm: Subversion Repositories
    (falling back to Subversion support)
    pulling from https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk
    reading in-repo file map from V:\Development\.hg\svn\filemap
    no changes found
    [command completed successfully Wed Jun 13 13:50:41 2012]
    Development% 
    

    I assume the response is that the issue is on the tortoiseHg side when passing the arguments to hg? Created a ticket there as well: https://bitbucket.org/tortoisehg/thg/issue/1958/tortoisehg-is-passing-wrong-command-line

  3. FlorianGeorge

    As this is a TortoiseHg issue, I tested the svn+https version manually via the command line, and the output was fine:

    V:\Development>hg --repository V:\Development pull --verbose svn+https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk
    pulling from svn+https://xxx.xxx.xxx.xxx:xxxx/svn/CCDev/trunk
    reading in-repo file map from V:\Development\.hg\svn\filemap
    no changes found
    
    V:\Development>
    

    Thanks!

  4. FlorianGeorge

    This issue has also just been solved on the TortoiseHg side, the extension must be registered by the name hgsubversion:

    hgsubversion = ...(path)...
    

    It fails the way described above if it is something else, like

    svn = ...(path)...
    

    https://bitbucket.org/tortoisehg/thg/issue/1935/please-recognize-svn-https-schema

    https://bitbucket.org/tortoisehg/thg/issue/905/repository-not-found-in-21-nightly

    https://bitbucket.org/tortoisehg/thg/issue/1958/tortoisehg-is-passing-wrong-command-line

  5. Log in to comment