mercurial_keyring issueshttps://foss.heptapod.net/mercurial/mercurial_keyring/-/issues2023-03-27T10:09:16Zhttps://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/77Fails with "module object for 'cryptography.utils' substituted in sys.modules...2023-03-27T10:09:16ZChris WesselingFails with "module object for 'cryptography.utils' substituted in sys.modules during a lazy load"I installed mercurial using pipx install and inject.
$ pipx runpip mercurial freeze
cffi==1.14.5
cryptography==3.4.5
jeepney==0.6.0
keyring==22.0.1
mercurial==5.7
mercurial-extension-utils==1.5.1
mercuria...I installed mercurial using pipx install and inject.
$ pipx runpip mercurial freeze
cffi==1.14.5
cryptography==3.4.5
jeepney==0.6.0
keyring==22.0.1
mercurial==5.7
mercurial-extension-utils==1.5.1
mercurial-keyring==1.3.1
pycparser==2.20
SecretStorage==3.3.1
Keyring works fine when tested directly with `$ [...env...]/python -m keyring set/get/del` but hg fails with
> keyring: keyring backend doesn't seem to work, password can not be restored. Falling back to prompts. Error details: module object for 'cryptography.utils' substituted in sys.modules during a lazy loadhttps://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/76keyring 21.0.6+ broken on macOS with demand import enabled2022-12-09T19:11:33ZMatt Harbisonkeyring 21.0.6+ broken on macOS with demand import enabledThe latest keying module (22.0.1) causes this warning, and a fallback to prompting for the password with py3.9.1:
```
keyring: keyring backend doesn't seem to work, password can not be restored. Falling back to prompts. Error details: N...The latest keying module (22.0.1) causes this warning, and a fallback to prompting for the password with py3.9.1:
```
keyring: keyring backend doesn't seem to work, password can not be restored. Falling back to prompts. Error details: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.
```
It works fine if using `HGDEMANDIMPORT=disable`. It was also an issue with the system python 3.7.4. I isolated it to some change in 21.0.6. I see there's a list of things in `mercurial_keyring.py` that are omitted from demandimport, but wasn't sure what needed to be stuffed in there.Marcin KasperskiMarcin Kasperskihttps://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/82broken as usual after upgrading Mercurial2022-03-27T03:27:08Zphp4fanbroken as usual after upgrading MercurialI upgraded TortoiseHG to the latest version, so then I upgraded Mercurial to 6.1 wich was required (5.9.something at least) by THG.
As usual, like every single time I have upgraded Mercurial, mercurial_keyring stopped working. I got the...I upgraded TortoiseHG to the latest version, so then I upgraded Mercurial to 6.1 wich was required (5.9.something at least) by THG.
As usual, like every single time I have upgraded Mercurial, mercurial_keyring stopped working. I got the error message below.
So I upgraded mercurial_keyring too, to version 1.4.1 (that's what I got by running "pip install --upgrade mercurial_keyring") and I get the exact same error message (with only some line numbers changed).
The error I paste is the one I get with keyring v. 1.4.1:
```
% hg pull --verbose https://xp-dev.com/hg/XXXXX
pulling from https://xp-dev.com/hg/XXXXX
** Unknown exception encountered with possibly-broken third-party extension "mercurial_keyring" (version N/A)
** which supports versions unknown of Mercurial.
** Please disable "mercurial_keyring" and try your action again.
** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues
** Python 3.8.12 (default, Aug 31 2021, 01:23:42) [GCC]
** Mercurial Distributed SCM (version 6.1)
** Extensions loaded: mercurial_keyring, tortoisehg.util.hgcommands, tortoisehg.util.hgdispatch, tortoisehg.util.partialcommit, tortoisehg.util.pipeui
** Unknown exception encountered with possibly-broken third-party extension "mercurial_keyring" (version N/A)
** which supports versions unknown of Mercurial.
** Please disable "mercurial_keyring" and try your action again.
** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues
** Python 3.8.12 (default, Aug 31 2021, 01:23:42) [GCC]
** Mercurial Distributed SCM (version 6.1)
** Extensions loaded: mercurial_keyring, tortoisehg.util.hgcommands, tortoisehg.util.hgdispatch, tortoisehg.util.partialcommit, tortoisehg.util.pipeui
Traceback (most recent call last):
File "/home/teo/.local/bin/hg", line 61, in <module>
dispatch.run()
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 144, in run
status = dispatch(req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 250, in dispatch
status = _rundispatch(req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 294, in _rundispatch
ret = _runcatch(req) or 0
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 470, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 480, in _callcatch
return scmutil.callcatch(ui, func)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/scmutil.py", line 153, in callcatch
return func()
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 460, in _runcatchfunc
return _dispatch(req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 1273, in _dispatch
return runcommand(
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 918, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 1285, in _runcommand
return cmdfunc()
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 1271, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/util.py", line 1887, in check
return func(*args, **kwargs)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/commands.py", line 6595, in serve
return server.runservice(opts, initfn=service.init, runfn=service.run)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/server.py", line 167, in runservice
return runfn()
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/commandserver.py", line 469, in run
return sv.serve()
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/commandserver.py", line 403, in serve
while self.serveone():
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/commandserver.py", line 377, in serveone
handler(self)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/commandserver.py", line 358, in runcommand
ret = self._dispatchcommand(req) & 255
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/commandserver.py", line 297, in _dispatchcommand
return dispatch.dispatch(req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 250, in dispatch
status = _rundispatch(req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 294, in _rundispatch
ret = _runcatch(req) or 0
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 470, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 480, in _callcatch
return scmutil.callcatch(ui, func)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/scmutil.py", line 153, in callcatch
return func()
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 460, in _runcatchfunc
return _dispatch(req)
File "/home/teo/programmi/thg/tortoisehg/util/hgdispatch.py", line 23, in _dispatch
return orig(req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 1273, in _dispatch
return runcommand(
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 918, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 1285, in _runcommand
return cmdfunc()
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/dispatch.py", line 1271, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/util.py", line 1887, in check
return func(*args, **kwargs)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/commands.py", line 5407, in pull
other = hg.peer(repo, opts, source)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/hg.py", line 239, in peer
return _peerorrepo(
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/hg.py", line 187, in _peerorrepo
obj = _peerlookup(path).instance(
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/httppeer.py", line 645, in instance
inst = makepeer(ui, path)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/httppeer.py", line 629, in makepeer
respurl, info = performhandshake(ui, url, opener, requestbuilder)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/httppeer.py", line 568, in performhandshake
resp = sendrequest(ui, opener, req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/httppeer.py", line 288, in sendrequest
res = opener.open(req)
File "/usr/lib64/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib64/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
File "/usr/lib64/python3.8/urllib/request.py", line 563, in error
result = self._call_chain(*args)
File "/usr/lib64/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib64/python3.8/urllib/request.py", line 1062, in http_error_401
response = self.http_error_auth_reqed('www-authenticate',
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/url.py", line 524, in http_error_auth_reqed
return urlreq.httpbasicauthhandler.http_error_auth_reqed(
File "/home/teo/.local/lib/python3.8/site-packages/mercurial_keyring.py", line 625, in basic_http_error_auth_reqed
return basic_http_error_auth_reqed.orig(self, authreq, host, req, headers)
File "/usr/lib64/python3.8/urllib/request.py", line 1011, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial/url.py", line 529, in retry_http_basic_auth
user, pw = self.passwd.find_user_password(
File "/home/teo/.local/lib/python3.8/site-packages/mercurial_keyring.py", line 616, in find_user_password
return self._pwd_handler.find_auth(self, realm, authuri, req)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial_keyring.py", line 432, in find_auth
user, pwd, src, final_url = self.get_credentials(
File "/home/teo/.local/lib/python3.8/site-packages/mercurial_keyring.py", line 346, in get_credentials
parsed_url, url_user, url_passwd = self.unpack_url(authuri)
File "/home/teo/.local/lib/python3.8/site-packages/mercurial_keyring.py", line 575, in unpack_url
parsed_url = util.url(authuri)
AttributeError: module 'mercurial.util' has no attribute 'url'
cmdserver: process exited unexpectedly with code 1
```https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/78Bytes vs str trouble in user names and password2021-05-01T23:54:05ZGabor MarotiBytes vs str trouble in user names and passwordSome data type conversion trouble appears to lurk around (or else I am doing something terribly wrong)
**System:**
Fedora 32, gnome-keyring-3.36.0, python-3.8.7, python3-keyring-21.8.0, mercurial-5.2, mercurial_keyring-1.4.0 (many thank...Some data type conversion trouble appears to lurk around (or else I am doing something terribly wrong)
**System:**
Fedora 32, gnome-keyring-3.36.0, python-3.8.7, python3-keyring-21.8.0, mercurial-5.2, mercurial_keyring-1.4.0 (many thanks for fixing #69!)
**Symptoms:**
`hg incoming` (just like all similar operations) retrieves the password but is unable to use it. Mercurial prompts for the password but can't use the typed password, either, and keeps prompting.
**Vague idea:**
As far as I understand the code, mercurial_keyring uses bytes for user names and passwords. These values find their way to Mercurial proper, but strings seem to be expected there. As a quick test, I changed the return statement of find_user_password() in mercurial_keyring.py:613 to `return b'myusername', b'mypassword'`, and it gives the aforementioned symptoms. However, `return 'myusername', 'mypassword'` works just fine. (BTW, my password consists of letters and digits only, without any crazy upper-half ASCII or Unicode character.)
Thanks in advance for looking at this issue.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/69Error when trying to save password, Cannot import backend2021-03-05T00:20:36ZAndrew WhalanError when trying to save password, Cannot import backendWhen trying to use mercurial keyring I get the following error:
`keyring: keyring backend doesn't seem to work, password was not saved. Error details: cannot import name 'backend' from 'cryptography.hazmat.backends.openssl.backend' (/us...When trying to use mercurial keyring I get the following error:
`keyring: keyring backend doesn't seem to work, password was not saved. Error details: cannot import name 'backend' from 'cryptography.hazmat.backends.openssl.backend' (/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/backend.py)`
However keyring works fine on the commandline:
```
$ keyring set system user
Password for 'user' in 'system':
$ keyring get system user
test
```
And from within python itself:
```
Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyring
>>> keyring.get_password("system","user")
'test'
```
I've tried both the default installed versions:
keyring==18.0.1
keyrings.alt==3.4.0
mercurial-keyring==1.3.0
And the latest version from this repo, specifying it specifically in .hgrc
I'm not sure what packages I might be missing as following the steps in the README.rst work fine:
```
$ keyring --list-backends
keyrings.alt.file.PlaintextKeyring (priority: 0.5)
keyrings.alt.file.EncryptedKeyring (priority: 0.6)
keyring.backends.SecretService.Keyring (priority: 5)
keyring.backends.fail.Keyring (priority: 0)
keyring.backends.chainer.ChainerBackend (priority: 10)
$ keyring -b keyring.backends.SecretService.Keyring set service user
Password for 'user' in 'service':
$ keyring -b keyring.backends.SecretService.Keyring get service user
test
$ keyring -b keyring.backends.chainer.ChainerBackend get service user
test
```
and I've forced the backend:
```
$ cat ~/.local/share/python_keyring/keyringrc.cfg
[backend]
default-keyring=keyring.backends.SecretService.Keyring
```
What should I do next?https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/71It's broken2021-03-04T18:42:48Zphp4fanIt's broken```
$ hg pull
pulling from *********************
keyring: keyring backend doesn't seem to work, password can not be restored. Falling back to prompts. Error details: cannot import name 'backend' from 'cryptography.hazmat.backends.openssl...```
$ hg pull
pulling from *********************
keyring: keyring backend doesn't seem to work, password can not be restored. Falling back to prompts. Error details: cannot import name 'backend' from 'cryptography.hazmat.backends.openssl.backend' (/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/backend.py)
```https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/74SMTP support needs to be updated for py32021-03-04T18:24:15ZMatt HarbisonSMTP support needs to be updated for py3I got this when sending an email:
```
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action...I got this when sending an email:
```
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues
** Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]
** Mercurial Distributed SCM (version 5.5.1)
** Extensions loaded: extdiff, evolve, topic, phabricator, phabblocker, mercurial_keyring, rebase, absorb, blackbox, strip, show, fix, mq, tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.win32ill, tortoisehg.util.hgdispatch, patchbomb
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues
** Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)]
** Mercurial Distributed SCM (version 5.5.1)
** Extensions loaded: extdiff, evolve, topic, phabricator, phabblocker, mercurial_keyring, rebase, absorb, blackbox, strip, show, fix, mq, tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.win32ill, tortoisehg.util.hgdispatch, patchbomb
Traceback (most recent call last):
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\Scripts\hg", line 43, in <module>
dispatch.run()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 113, in run
status = dispatch(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 303, in dispatch
ret = _runcatch(req) or 0
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 479, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 488, in _callcatch
return scmutil.callcatch(ui, func)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\scmutil.py", line 152, in callcatch
return func()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 469, in _runcatchfunc
return _dispatch(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1233, in _dispatch
lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 917, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1244, in _runcommand
return cmdfunc()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1230, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\hgext\mq.py", line 4226, in mqcommand
return orig(ui, repo, *args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commands.py", line 6519, in serve
return server.runservice(opts, initfn=service.init, runfn=service.run)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\server.py", line 164, in runservice
return runfn()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 469, in run
return sv.serve()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 403, in serve
while self.serveone():
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 377, in serveone
handler(self)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 358, in runcommand
ret = self._dispatchcommand(req) & 255
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\commandserver.py", line 297, in _dispatchcommand
return dispatch.dispatch(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 303, in dispatch
ret = _runcatch(req) or 0
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 479, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 488, in _callcatch
return scmutil.callcatch(ui, func)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\scmutil.py", line 152, in callcatch
return func()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 469, in _runcatchfunc
return _dispatch(req)
File "c:\Users\Matt\projects\thg_py3\tortoisehg\util\hgdispatch.py", line 23, in _dispatch
return orig(req)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1233, in _dispatch
lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 917, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1244, in _runcommand
return cmdfunc()
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\dispatch.py", line 1230, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\util.py", line 1867, in check
return func(*args, **kwargs)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\hgext\patchbomb.py", line 967, in email
sendmail = mail.connect(ui, mbox=mbox)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\mail.py", line 228, in connect
return _smtp(ui)
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial_keyring.py", line 772, in _smtp
username = ui.config('smtp', 'username')
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\ui.py", line 610, in config
section, name, default=default, untrusted=untrusted
File "c:\Users\Matt\projects\thg_py3\build\venv-thg-py3.7.1-x64\lib\site-packages\mercurial\ui.py", line 629, in _config
msg %= (section, name)
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'
cmdserver: process exited unexpectedly with code 1
```
There are a bunch of `ui`, `config`, and `raise error` cases that aren't prefixed with `b''` (or otherwise converted to bytes). I started changing them, but realizes that some of the variables being formatted in with `%s` may be str that need to be converted to bytes, so I stopped since I didn't see any tests that I could run, and didn't want to make things worse.
The `buglink` attribute at the button also needs a `b''` prefix.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/66Moving out of BitBucket2021-02-20T19:09:28ZBitbucket ImporterMoving out of BitBucket*Created originally on Bitbucket by [Alphare (Raphaël Gomès)](https://bitbucket.org/%7B288ac559-f99f-40e8-920d-fac938a106e2%7D/)*
Hi.
With BitBucket sunsetting Mercurial support, I thought I’d extend an invitation to move this project...*Created originally on Bitbucket by [Alphare (Raphaël Gomès)](https://bitbucket.org/%7B288ac559-f99f-40e8-920d-fac938a106e2%7D/)*
Hi.
With BitBucket sunsetting Mercurial support, I thought I’d extend an invitation to move this project to [Heptapod](http://heptapod.net). We \(Octobus, the people behind Heptapod\), use `mercurial-keyring` extensively and would like to help all Mercurial-related extensions get a new home before the official support ends.
We have a public instance at [dev.heptapod.net](http://dev.heptapod.net) that already hosts many projects. We’ve been using it for months internally and have been starting to open up to other developers/projects. We would provide you with credentials and a way of migrating the current issues over.
Tell me if that sounds like something you would like to do.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/70Breaks every time I upgrade Ubuntu2021-02-20T18:52:42Zphp4fanBreaks every time I upgrade UbuntuEvery single time I upgrade Ubuntu (i.e. from a release to another, i.e. 19.10 to 20.04), this extension stops working.
And it's not like mercurial just stops remembering my passwords, it crashes every time I run a command that requires ...Every single time I upgrade Ubuntu (i.e. from a release to another, i.e. 19.10 to 20.04), this extension stops working.
And it's not like mercurial just stops remembering my passwords, it crashes every time I run a command that requires a password (and all other commands nag me with warnings that the extension is broken).
So I usually end up uninstalling it when I'm in a hurry to get work done, and then reinstall it some time later.
It would be nice if this didn't happen. There must be a way.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/73an update to various links in the README2021-02-20T18:45:55ZAnton Shestakovan update to various links in the READMEI've updated links to mercurial and thg here: https://code.rhodecode.com/u/av6/wip/mercurial_keyring
Feel free to fold the changesets after reviewing.I've updated links to mercurial and thg here: https://code.rhodecode.com/u/av6/wip/mercurial_keyring
Feel free to fold the changesets after reviewing.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/72Fails to import on macOS with Mercurial 5.4.22021-02-20T18:35:48ZScott PalmerFails to import on macOS with Mercurial 5.4.2» hg version -v scott@Scotts-MacBook-Pro
*** failed to import extension mercurial_keyring: 'zipimport.zipimporter' object has n...» hg version -v scott@Scotts-MacBook-Pro
*** failed to import extension mercurial_keyring: 'zipimport.zipimporter' object has no attribute 'exec_module'
Mercurial Distributed SCM (version 5.4.2)
...
I made sure to update everything (in Python 2 and 3)
...
Requirement already up-to-date: mercurial_keyring in /Library/Python/2.7/site-packages/mercurial_keyring-1.3.1-py2.7.egg (1.3.1)
...
Requirement already up-to-date: mercurial_keyring in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/mercurial_keyring-1.3.1-py3.7.egg (1.3.1)https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/67Document how the f*** to reset passwords2020-04-07T07:58:07ZBitbucket ImporterDocument how the f*** to reset passwords*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
I use mercurial keyring and I want it to forget a password for a given user/server \(as if I had never accessed...*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
I use mercurial keyring and I want it to forget a password for a given user/server \(as if I had never accessed it and never entered the password\) or, if that is not possible, reset everything that the keyring has stored, i.e. wipe everything out. completely reset it so that it will ask all my passwords once as it did at the beginning of time.
This MUST be possible. If it’s not, then you forgot to implement a very basic feature.
If it is, as I suppose, it’s not documented here:
[https://www.mercurial-scm.org/wiki/KeyringExtension](https://www.mercurial-scm.org/wiki/KeyringExtension)
My use case is that I’m having trouble accessing a repository that I’ve migrated to a new server \(though it has the same user and password\) and the server is behaving as if the client is not providing the password at all. It might be an error on the server side but I need to be sure by authenticating normally making 100% sure I’m providing the password. There might be tons of other different legitimate usecases.
A keyring store passwords. Resetting them is a basic function. And a user must be able to easily find how to do that.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/65Broken since forever: failed to import extension mercurial_keyring: No module...2020-04-07T07:58:06ZBitbucket ImporterBroken since forever: failed to import extension mercurial_keyring: No module named builtins*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
On ubuntu 16.04, which has Mercurial version 3.7.3, I installed mercurial keyring with
```
sudo apt-get inst...*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
On ubuntu 16.04, which has Mercurial version 3.7.3, I installed mercurial keyring with
```
sudo apt-get install mercurial-keyring
```
Every time I run any hg command I get this error:
```
failed to import extension mercurial_keyring: No module named builtins
```
and of course the keyring doesn’t workhttps://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/64Compatibility with Python 32020-04-07T07:58:05ZBitbucket ImporterCompatibility with Python 3*Created originally on Bitbucket by [Jan Niklas Hasse](https://bitbucket.org/%7Bcafe42c4-8c63-4556-ae3c-3210bbd5ccc9%7D/)*
See [https://www.mercurial-scm.org/wiki/Python3#Porting\_Extensions\_to\_Python\_3](https://www.mercurial-scm.org...*Created originally on Bitbucket by [Jan Niklas Hasse](https://bitbucket.org/%7Bcafe42c4-8c63-4556-ae3c-3210bbd5ccc9%7D/)*
See [https://www.mercurial-scm.org/wiki/Python3#Porting\_Extensions\_to\_Python\_3](https://www.mercurial-scm.org/wiki/Python3#Porting_Extensions_to_Python_3)https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/63AttributeError during process finish with keyring >= 16.0.12020-04-07T07:58:04ZMatt HarbisonAttributeError during process finish with keyring >= 16.0.1Originally reported to the hg bug tracker:
https://bz.mercurial-scm.org/show_bug.cgi?id=6043
I wonder if the change in hg 8e89c2bec1f7 unmasked an existing problem. OTOH, it doesn't appear to be a problem with TortoiseHg 4.6.1, whi...Originally reported to the hg bug tracker:
https://bz.mercurial-scm.org/show_bug.cgi?id=6043
I wonder if the change in hg 8e89c2bec1f7 unmasked an existing problem. OTOH, it doesn't appear to be a problem with TortoiseHg 4.6.1, which shipped 1.1.8.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/62'module' object has no attribute 'ignore' with Mercurial 4.72020-04-07T07:58:03ZBitbucket Importer'module' object has no attribute 'ignore' with Mercurial 4.7*Created originally on Bitbucket by [cronik (Kyle Cronin)](https://bitbucket.org/%7Bba65fc30-69fb-4194-b3c1-e95bc1f4330e%7D/)*
After upgrading to Mercurial 4.7 mercurial keyring fails with the following stack trace.
```
** Unknown e...*Created originally on Bitbucket by [cronik (Kyle Cronin)](https://bitbucket.org/%7Bba65fc30-69fb-4194-b3c1-e95bc1f4330e%7D/)*
After upgrading to Mercurial 4.7 mercurial keyring fails with the following stack trace.
```
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to https://bitbucket.org/Mekk/mercurial_keyring/issues
** Python 2.7.15 (default, Jun 18 2018, 11:44:54) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)]
** Mercurial Distributed SCM (version 4.7)
** Extensions loaded: churn, convert, mercurial_keyring, rebase, purge, record, shelve, strip, eol, extdiff
Traceback (most recent call last):
File "/usr/local/bin/hg", line 41, in <module>
dispatch.run()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 90, in run
status = dispatch(req)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 213, in dispatch
ret = _runcatch(req) or 0
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 354, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 362, in _callcatch
return scmutil.callcatch(ui, func)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/scmutil.py", line 161, in callcatch
return func()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 344, in _runcatchfunc
return _dispatch(req)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 984, in _dispatch
cmdpats, cmdoptions)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 730, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 992, in _runcommand
return cmdfunc()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/dispatch.py", line 981, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/util.py", line 1528, in check
return func(*args, **kwargs)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/commands.py", line 4369, in push
opargs=opargs)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/exchange.py", line 528, in push
_pushbundle2(pushop)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/exchange.py", line 1110, in _pushbundle2
'url': pushop.remote.url(),
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/thirdparty/concurrent/futures/_base.py", line 457, in result
return self.__get_result()
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/wireprotov1peer.py", line 210, in sendcommands
result = fn(**pycompat.strkwargs(args))
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/wireprotov1peer.py", line 480, in unbundle
stream = self._calltwowaystream('unbundle', bundle, heads=heads)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 533, in _calltwowaystream
return self._callstream(cmd, data=fp_, headers=headers, **args)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 462, in _callstream
resp = sendrequest(self.ui, self._urlopener, req)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/httppeer.py", line 311, in sendrequest
res = opener.open(req)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 909, in http_error_401
url, req, headers)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/url.py", line 463, in http_error_auth_reqed
self, auth_header, host, req, headers)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 565, in basic_http_error_auth_reqed
return basic_http_error_auth_reqed.orig(self, authreq, host, req, headers)
File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 887, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/mercurial/url.py", line 467, in retry_http_basic_auth
realm, urllibcompat.getfullurl(req))
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 556, in find_user_password
return self._pwd_handler.find_auth(self, realm, authuri, req)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 386, in find_auth
pwmgr, realm, authuri, skip_caches=after_bad_auth)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 349, in get_credentials
keyring_pwd = password_store.get_http_password(keyring_url, actual_user)
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 164, in get_http_password
self._format_http_key(url, username))
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 205, in _read_password_from_keyring
keyring = import_keyring()
File "/usr/local/lib/python2.7/site-packages/mercurial_keyring.py", line 136, in import_keyring
"fs.opener",
File "/usr/local/lib/python2.7/site-packages/mercurial_extension_utils.py", line 1013, in direct_import_ext
if blocked_module not in demandimport.ignore:
File "/usr/local/Cellar/mercurial/4.7/lib/python2.7/site-packages/hgdemandimport/demandimportpy2.py", line 146, in __getattr__
return getattr(self._module, attr)
AttributeError: 'module' object has no attribute 'ignore'
```
Installed mercurial_keyring info
```
pip show mercurial_keyring
Name: mercurial-keyring
Version: 1.1.8
Summary: Mercurial Keyring Extension
Home-page: http://bitbucket.org/Mekk/mercurial_keyring
Author: Marcin Kasperski
Author-email: Marcin.Kasperski@mekk.waw.pl
License: BSD
Location: /usr/local/lib/python2.7/site-packages
Requires: mercurial-extension-utils, keyring
Required-by:
```https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/61TortoiseHg encounters unknown exception with mercurial_keyring2020-04-07T07:58:01ZBitbucket ImporterTortoiseHg encounters unknown exception with mercurial_keyring*Created originally on Bitbucket by Anonymous*
Hello
I am setting up a Mac for development using Mercurial and TortoiseHg for revision control.
My .hgrc-file contains:
"[extensions]
mercurial_keyring ="
I get the following er...*Created originally on Bitbucket by Anonymous*
Hello
I am setting up a Mac for development using Mercurial and TortoiseHg for revision control.
My .hgrc-file contains:
"[extensions]
mercurial_keyring ="
I get the following error when detecting outgoing changes to my repository:
% hg outgoing --template {node}^M https://repo.rtx.net/hg/Projects/Rtx7xxxSetupTool
comparing with https://repo.rtx.net/hg/Projects/Rtx7xxxSetupTool
** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring
** which supports versions unknown of Mercurial.
** Please disable mercurial_keyring and try your action again.
** If that fixes the bug please report it to https://bitbucket.org/Mekk/mercurial_keyring/issues
** Python 2.7.15 (default, Jun 26 2018, 23:08:04) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)]
** Mercurial Distributed SCM (version 4.6.1)
** Extensions loaded: mercurial_keyring, rebase, tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.hgdispatch
Without mercurial_keyring in my [extensions] it works fine.
pip list:
Package Version
------------------------- -------
entrypoints 0.2.3
keyring 13.2.1
mercurial 4.6.2
mercurial-extension-utils 1.3.5
mercurial-keyring 1.1.9
I have another Mac where it works. This has different versions of the pip installs:
Package Version
------------------------- -------
entrypoints 0.2.3
keyring 12.0.1
mercurial 4.5.2
mercurial-extension-utils 1.3.4
mercurial-keyring 1.1.8
macOS version 10.13.4
Hope you can help :-)
Best regards,
Thomas Sørensenhttps://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/60Extension apparently installs but is completely broken on Ubuntu 16.042020-04-07T07:58:01ZBitbucket ImporterExtension apparently installs but is completely broken on Ubuntu 16.04*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
After https://bitbucket.org/Mekk/mercurial_keyring/issues/59/stopped-working-on-ubuntu-1604,
I ran:
```
sud...*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
After https://bitbucket.org/Mekk/mercurial_keyring/issues/59/stopped-working-on-ubuntu-1604,
I ran:
```
sudo apt-get install python-pip
```
and then:
```
pip install --user mercurial_keyrin
```
The output ended with:
> Successfully built mercurial-keyring mercurial-extension-utils secretstorage configparser pycparser
Installing collected packages: pycparser, cffi, enum34, asn1crypto, idna, six, ipaddress, cryptography, secretstorage, configparser, entrypoints, keyring, mercurial-extension-utils, mercurial-keyring
**Successfully installed** asn1crypto cffi configparser cryptography-1.2.3 entrypoints enum34-1.1.2 idna-2.0 ipaddress-1.0.16 keyring-7.3 mercurial-extension-utils **mercurial-keyring-0.6.2** pycparser secretstorage-2.1.3 six-1.10.0
Yet, I keep getting the same error when I run hg:
```
$ hg
*** failed to import extension mercurial_keyring: No module named builtins
```
Even if I missed something in the installation, then the message telling me that mercurial_keyring was succesfully installed is wrong.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/59Stopped working on Ubuntu 16.04, installation docs are outdated2020-04-07T07:58:00ZBitbucket ImporterStopped working on Ubuntu 16.04, installation docs are outdated*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
I installed mercurial_keyring ages ago, before I upgraded Ubuntu to 16.04.
After upgrading Ubuntu to 16.04, mer...*Created originally on Bitbucket by [teo8976 (Teo Tei)](https://bitbucket.org/%7B4d381d15-4c61-4a29-9de3-d1b5a89dbb2a%7D/)*
I installed mercurial_keyring ages ago, before I upgraded Ubuntu to 16.04.
After upgrading Ubuntu to 16.04, mercurial_keyring stopped working, and every time I ran a hg command I would get this working:
```
*** failed to import extension mercurial_keyring: No module named builtins
```
This already sucks in itself, but the worst is the following.
I had leaved with this until to now (that is, without the extension and with the warning every time), then I finally decided to try and fix, by reinstalling, upgrading mercurial_keyring or whatever.
So I went to
https://www.mercurial-scm.org/wiki/KeyringExtension
and then
https://pypi.org/project/mercurial_keyring/
Under "prerequisites", it recommends to do this on Ubuntu:
```
sudo apt-get install python-keyring python-keyring-gnome
```
This throws an error:
```
$ sudo apt-get install python-keyring python-keyring-gnome
[sudo] password for teo:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-keyring-gnome
```
I don't know if `python-keyring-gnome` doesn't exist anymore or if I need to add the repository for apt or whatever, but **the installation guide is either wrong or incomplete**.
I hate having to waste time to figure out how to install something (especially something I had already installed), but I hate it even more when there is an official guide that is supposed to save me from wasting that time, and it doesn't work.https://foss.heptapod.net/mercurial/mercurial_keyring/-/issues/58mercurial_keyring asking for password every time2020-04-07T07:57:59ZBitbucket Importermercurial_keyring asking for password every time*Created originally on Bitbucket by Anonymous*
This would appear to be a duplicate of issue #49 but that issue appears old and claims to be resolved.
We are using Mercurial 4.5.2, Tortoisehg 4.5.2, and python 2.7.12. In python we...*Created originally on Bitbucket by Anonymous*
This would appear to be a duplicate of issue #49 but that issue appears old and claims to be resolved.
We are using Mercurial 4.5.2, Tortoisehg 4.5.2, and python 2.7.12. In python we have mercurial-keyring 1.1.9 and mercurial-extension-utils 1.3.4.
It seems that when we clone a repo with “hg clone”, it *always* prompts for the encrypted keyring password. I have read numerous articles (all old) about how to avoid this but it seems that none of the solutions work. The only way to avoid this is to disable mercurial_keyring in ~/.hgrc, which this of course requires that we input our repo credentials every time.
I have tried several documented ways to fix this in ~/.hgrc and none seem to work, so I assume there is something wrong with the interaction between this version of tortoisehg/mercurial and mercurial_keyring.
I tried installing older versions of mercurial_keyring. All seem to produce the same behavior starting with 1.1.5. Versions prior to 1.1.5 fail in more spectacular ways which I did not try to troubleshoot.
Is there a way to prevent mercurial_keyring from requiring a password every time? Specifically, the prompt is:
"Please enter password for encrypted keyring:"
Upon successfully entering the keyring password, I am automatically logged into our mercurial repo. So I assume the keyring is working. Just want to stop entering a password every time.
Thanks!
Roger