“代理人没有身份"是什么意思? [英] What does 'the agent has no identities' mean?

查看:30
本文介绍了“代理人没有身份"是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我成功地遵循了来自 GitHub 的 这些说明,了解如何生成 SSH 密钥我与 GitHub 的联系很成功.

I succesfully followed these instructions from GitHub on how to generate SSH keys and my connection with GitHub is succesfull.

但是当我以后想按照 这些说明 当我使用 ssh-add -l 时,我没有在我的 GitHub SSH 密钥设置页面中看到 SSH 指纹.

But when I later want to check my SSH key following these instructions I don't get the SSH fingerprint I see in my GitHub SSH Keys setting page when I use ssh-add -l.

我收到的消息不是 SSH 密钥指纹,而是 代理没有身份. 为什么?这是什么意思?

Instead of the SSH key fingerprint I get the message The agent has no identities. Why? And what does it mean?

推荐答案

这意味着您还没有成功地将您的密钥添加到您的代理.使用 ssh-add 执行此操作,如第 3 步第 2 部分第一个链接中所述.

This means you haven't successfully added your key to your agent. Use ssh-add to do so, as given in step 3, part 2 of your first link.

注意,这需要对每个 ssh-agent 实例进行;因此,如果您注销并重新登录,则需要再次 ssh-add 您的密钥.同样,如果您在两个不同的终端窗口中启动 ssh-agent 两次,它们之间不会共享私钥,因此您需要 ssh-add 一次在每个窗口中(或者,更好地配置您的系统,以便在桌面会话中的所有正在运行的应用程序之间共享一个代理).

Note that this needs to be done for each ssh-agent instance; thus, if you log out and back in, you need to ssh-add your key again. Similarly, if you start ssh-agent twice, in two different terminal windows, they won't have shared private keys between them, so you would need to ssh-add once in each window (or, better, configure your system in such a way as to have an agent shared between all running applications in your desktop session).

现代桌面环境一般都会为你提供一个 SSH 密钥环,所以如果你的代理是这样配置的,你不需要自己启动 ssh-agent,这样提供的代理实例应该是共享的在整个会话中.gnome-keyring 的行为方式如此,Apple 的钥匙串和 KDE 的 Wallet(启用了 ksshaskpass)也是如此.

Modern desktop environments generally will provide a SSH keyring for you, so you shouldn't need to start ssh-agent yourself if your agent is so configured, and the agent instance so provided should be shared across your entire session. gnome-keyring behaves this way, as does Apple's keychain and KDE's Wallet (with ksshaskpass enabled).

这篇关于“代理人没有身份"是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆