Daniel Williams
Daniel Williams

Reputation: 9314

TortoiseHg 3.6.3 broke mercurial keyring?

I upgraded to Tortoise 3.6.3 yesterday and now I am prompted every time I pull or push a repo. The keyring is set properly, and my user name is in the url.

Any ideas on what may be wrong? Did 3.6.3 break keyring?

Upvotes: 3

Views: 703

Answers (2)

Darkseal
Darkseal

Reputation: 9564

UPDATE: A new version of TortoiseHG has been released (3.8.3 at the time of writing) and fixes this issue: upgrading to latest version should be enough.

I had this exact same problem and found the following investigation article to be quite helpful to better understand what't going on (I'm not the author, BTW).

To cut it short, it seems a bug of the mercurial_keyring extension v1.0.1, introduced in TortoiseHG 3.6.2, which also appears to be fixed in v1.1.1.

If you're into Python compiling, it should be possible to upgrade it manually into TortoiseHG by getting it from its official bitbucket repo, compile it and manually place it into TortoiseHG's /lib/library.zip file (backup it beforehand might be wise): if you're not, you have 2 options:

1) clone the bitbucket repo to your HDD and then configure your Mercurial installation to use the new version of that extension module by writing the following in your C:\Users\USERNAME\mercurial.ini file (which was what I did):

[extensions]
mercurial_keyring = /path/to/mercurial_keyring/mercurial_keyring.py

(Notice: you might also have to put the path in your PATH or PYTHONPATH env variable, depending if you already have Python and/or Mercurial installed on your machine).

2) wait for the next TortoiseHG release that will contain the updated version.

Upvotes: 1

Lazy Badger
Lazy Badger

Reputation: 97355

Issue 4401 "mercurial_keyring always asks for user/password" from time of 3.6.2 closed as pure extension-specific and contains solution: don't use username in URL anymore

Here is what to put into .hg/hgrc:

[auth]
default.username=myname
default.prefix=http://myrepo

A good way to debug issues like this is to run merciural from the command line with the debug flag, as in:

hg pull --debug

This will clearly indicate if there are problems getting the repo, user name, and password.

Upvotes: 2

Related Questions