mercurial_keyring always asks for user/password

Create issue
Issue #4401 closed
Eddy Gasparotto created an issue

version 3.6.2 always asks for user/password (using mercurial_keyring plugin) and a console message is shown:

comparing with http://user@xxxxx.yyyyy.zzzzz "username not specified in hgrc (or in url). Password will not be saved."

User is specified in url and version 3.6.1 works as expected.

Comments (11)

  1. Yuya Nishihara

    Thanks, closes the issue at our side.

    BTW, it's preferable to test in cmd.exe because TortoiseHg Console might be slightly different from the bare hg command.

  2. Justinas

    the old behaviour where the username was read form the url does not work. to make the keyring work again you have to downgrade to v3.6.1 or add [auth] section to your hgrc and specify username and prefix, for example:

    default = http://my-url-to.repo
    default.username = gamesh
    default.prefix = http://my-url-to.repo
  3. Justinas

    @yuja maybe tortoisehg form v3.6.2 could store the username in the new format and add the default.prefix url by default when saving paths?

  4. Yuya Nishihara

    @Gamesh It is indeed the recommended way to store username. (Padlock icon -> User Authentication.) But we won't prevent user from embedding it in a URL.

  5. Diego Bonfil Traver

    Maybe not an extension bug. Has something changed in how the find_user_password of passwordmgr is called? the authuri that arrives at mercurial_keyring extension has already the user/password part stripped... so it cannot get the user from the URL.

    I have also notified the extension author, just in case I am wrong with my guess.

  6. Yuya Nishihara

    As Mercurial doesn't provide a public API for extensions, it is up to the extension author to follow API changes in Mercurial. Anyway, this isn't a Tortoise issue.

  7. Log in to comment