git Android Studio 使用的 ssh-key
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27991311/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ssh-key used by git Android Studio
提问by NegatioN
I need to connect to an organization, and therefore need to provide a public ssh-key. However, I am unsure which ssh-key is in use by Android Studio. I find myself confused because of the various ssh-options in Android Studio.
我需要连接到一个组织,因此需要提供一个公共 ssh 密钥。但是,我不确定 Android Studio 正在使用哪个 ssh 密钥。由于 Android Studio 中的各种 ssh 选项,我发现自己很困惑。
Does it simply use the only one generated by my current git-installation?
它是否只是使用我当前的 git 安装生成的唯一一个?
Pictures added for illustration. These files seem to correspond, and were created upon installation of the GitHub windows-client, but according to GitHub itself, has never been utilized.
添加的图片用于说明。这些文件似乎是对应的,并且是在安装 GitHub windows-client 时创建的,但根据 GitHub 本身,从未使用过。
ex. /users/$name/.ssh/github_rsa.pub
前任。/users/$name/.ssh/github_rsa.pub
采纳答案by NegatioN
A device has only one ssh-key for authenticating with GitHub.
一台设备只有一个 ssh-key 用于与 GitHub 进行身份验证。
So in this case, I needed to use the key generated by my GitHub-client, which authed all other programs using git from this client.
因此,在这种情况下,我需要使用我的 GitHub 客户端生成的密钥,该客户端使用来自该客户端的 git 对所有其他程序进行身份验证。
回答by Dan
For Mac users having trouble with ssh keys, I had to switch Android Studio to my "Native" SSH executable. Then it worked. See screenshot.
对于在使用 ssh 密钥时遇到问题的 Mac 用户,我不得不将 Android Studio 切换到我的“本机”SSH 可执行文件。然后它起作用了。见截图。