为什么我在执行“快速分享”时会出现 gnomekeyring.IOError?

为什么我在执行“快速分享”时会出现 gnomekeyring.IOError?

当我想通过执行将我的应用程序推送到 Launchpad 时quickly share --verbose,我收到以下 Gnome Keyring 错误:

Get Launchpad Settings
Traceback (most recent call last):
  File "/usr/share/quickly/templates/ubuntu-application/share.py", line 101, in <module>
    launchpad = launchpadaccess.initialize_lpi()
  File "/usr/lib/python2.7/dist-packages/quickly/launchpadaccess.py", line 91, in initialize_lpi
    allow_access_levels=["WRITE_PRIVATE"])
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 539, in login_with
    credential_save_failed, version)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 342, in _authorize_token_and_login
    authorization_engine.unique_consumer_id)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 282, in load
    return self.do_load(unique_key)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 336, in do_load
    'launchpadlib', unique_key)
  File "/usr/lib/python2.7/dist-packages/keyring/core.py", line 34, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/usr/lib/python2.7/dist-packages/keyring/backend.py", line 154, in get_password
    items = gnomekeyring.find_network_password_sync(username, service)
gnomekeyring.IOError
ERROR: share command failed
Aborting

这曾经有效,所以这意味着我已经配置了 SSH 和 GPG。这可能是部分解释:当我通过带有 X 转发的 ssh 隧道连接到此计算机时,会出现此错误。但当我可以物理访问计算机时,不会出现此错误。

您能给我一些建议吗?告诉我该怎么做?

答案1

发生这种情况的原因是 launchpadlib(用于访问 launchpad 的客户端库)将其凭据存储在 gnome 密钥环中。quickly 使用 launchpadlib 来访问 Launchpad。

另请参阅这个错误:https://bugs.launchpad.net/python-keyring/+bug/796873

最好的解决方法是确保您在 GNOME 密钥环可用的环境中运行。

相关内容