コロナ19により在宅勤務をしています。私の仕事には、TortoiseHG WorkbenchがインストールされているLinux(Ubuntu)コンピュータがあります。 MobaXTerm経由でSSH経由でコンピュータに接続します。
通常、リポジトリを更新しようとすると、パスワードとユーザーがキーリングに保存されるため、機能します。 SSH経由で接続すると、THGのバグが原因でリポジトリを更新できなくなります。
** Mercurial Distributed SCM (version 4.5.3)
** Extensions loaded: mercurial_keyring, extdiff, rebase, strip, histedit, tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.hgdispatch
Traceback (most recent call last):
File "/usr/bin/hg", line 41, in <module>
dispatch.run()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 88, in run
status = (dispatch(req) or 0) & 255
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 183, in dispatch
ret = _runcatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 324, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 332, in _callcatch
return scmutil.callcatch(ui, func)
File "/usr/lib/python2.7/dist-packages/mercurial/scmutil.py", line 154, in callcatch
return func()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 314, in _runcatchfunc
return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 918, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 673, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 926, in _runcommand
return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 915, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1197, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 4764, in serve
return server.runservice(opts, initfn=service.init, runfn=service.run)
File "/usr/lib/python2.7/dist-packages/mercurial/server.py", line 107, in runservice
return runfn()
File "/usr/lib/python2.7/dist-packages/mercurial/commandserver.py", line 339, in run
return sv.serve()
File "/usr/lib/python2.7/dist-packages/mercurial/commandserver.py", line 292, in serve
while self.serveone():
File "/usr/lib/python2.7/dist-packages/mercurial/commandserver.py", line 267, in serveone
handler(self)
File "/usr/lib/python2.7/dist-packages/mercurial/commandserver.py", line 251, in runcommand
ret = (dispatch.dispatch(req) or 0) & 255 # might return None
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 183, in dispatch
ret = _runcatch(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 324, in _runcatch
return _callcatch(ui, _runcatchfunc)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 332, in _callcatch
return scmutil.callcatch(ui, func)
File "/usr/lib/python2.7/dist-packages/mercurial/scmutil.py", line 154, in callcatch
return func()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 314, in _runcatchfunc
return _dispatch(req)
File "/usr/lib/python2.7/dist-packages/tortoisehg/util/hgdispatch.py", line 23, in _dispatch
return orig(req)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 918, in _dispatch
cmdpats, cmdoptions)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 673, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 926, in _runcommand
return cmdfunc()
File "/usr/lib/python2.7/dist-packages/mercurial/dispatch.py", line 915, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1197, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1197, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/hgext/rebase.py", line 1771, in pullrebase
ret = orig(ui, repo, *args, **opts)
File "/usr/lib/python2.7/dist-packages/mercurial/util.py", line 1197, in check
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/mercurial/commands.py", line 3990, in pull
other = hg.peer(repo, opts, source)
File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 181, in peer
return _peerorrepo(rui, path, create).peer()
File "/usr/lib/python2.7/dist-packages/mercurial/hg.py", line 156, in _peerorrepo
obj = _peerlookup(path).instance(ui, path, create)
File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 497, in instance
inst._fetchcaps()
File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 239, in _fetchcaps
self._caps = set(self._call('capabilities').split())
File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 407, in _call
fp = self._callstream(cmd, **args)
File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 336, in _callstream
resp = self._openurl(req)
File "/usr/lib/python2.7/dist-packages/mercurial/httppeer.py", line 193, in _openurl
ret = self._urlopener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 467, in error
result = self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 916, in http_error_401
url, req, headers)
File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 422, in http_error_auth_reqed
self, auth_header, host, req, headers)
File "/usr/lib/python2.7/dist-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/lib/python2.7/urllib2.py", line 894, in http_error_auth_reqed
return self.retry_http_basic_auth(host, req, realm)
File "/usr/lib/python2.7/dist-packages/mercurial/url.py", line 426, in retry_http_basic_auth
realm, urllibcompat.getfullurl(req))
File "/usr/lib/python2.7/dist-packages/mercurial_keyring.py", line 556, in find_user_password
return self._pwd_handler.find_auth(self, realm, authuri, req)
File "/usr/lib/python2.7/dist-packages/mercurial_keyring.py", line 386, in find_auth
pwmgr, realm, authuri, skip_caches=after_bad_auth)
File "/usr/lib/python2.7/dist-packages/mercurial_keyring.py", line 349, in get_credentials
keyring_pwd = password_store.get_http_password(keyring_url, actual_user)
File "/usr/lib/python2.7/dist-packages/mercurial_keyring.py", line 164, in get_http_password
self._format_http_key(url, username))
File "/usr/lib/python2.7/dist-packages/mercurial_keyring.py", line 206, in _read_password_from_keyring
password = keyring.get_password(KEYRING_SERVICE, pwdkey)
File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 41, in get_password
return _keyring_backend.get_password(service_name, username)
File "/usr/lib/python2.7/dist-packages/keyring/backends/SecretService.py", line 66, in get_password
collection = self.get_preferred_collection()
File "/usr/lib/python2.7/dist-packages/keyring/backends/SecretService.py", line 60, in get_preferred_collection
raise InitError("Failed to unlock the collection!")
keyring.errors.InitError: Failed to unlock the collection!
** 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.17 (default, Apr 15 2020, 17:20:14) [GCC 7.5.0]
** Mercurial Distributed SCM (version 4.5.3)
** Extensions loaded: mercurial_keyring, extdiff, rebase, strip, histedit, tortoisehg.util.hgcommands, tortoisehg.util.partialcommit, tortoisehg.util.pipeui, tortoisehg.util.hgdispatch
cmdserver: process exited unexpectedly with code 1
私の知る限り、Keyring Demonはまだリリースされていません。私はいくつかの調査をしましたが、正しいエージェントを起動する方法が見つかりませんでした。 Ubuntu Gnomeには、デスクトップ環境の起動時にのみ起動される特別なキーリングはありますか?このサービスをどのように開始できますか?
答え1
たとえば、次のようにホストシステムでGNOME Keyringを起動できます。これら 指示する。
ただし、通常のデスクトップコンピュータにアクセスしている場合は、ロックされたXセッションがすでに存在する可能性があります。この場合、その資格情報をSSHセッションと共有するだけです。だから、あなたはただ必要です共有アクセスデーモンの資格情報:
$ソース $HOME/.dbus/session-bus/*-0
また、見ることができますその他のオプション。
答え2
同じエラーが発生しました。 gimme-aws-credsとawsloginは機能しませんでした。 Ubuntu 20 GUIにログインしてログアウトしましたが、SSHを介してすべてが通常どおり再び機能し始めました。