简体   繁体   English

git Android Studio使用的ssh-key

[英]ssh-key used by git Android Studio

I need to connect to an organization, and therefore need to provide a public ssh-key. 我需要连接到一个组织,因此需要提供一个公共ssh密钥。 However, I am unsure which ssh-key is in use by Android Studio. 但是,我不确定Android Studio正在使用哪个ssh-key。 I find myself confused because of the various ssh-options in Android Studio. 由于Android Studio中的各种ssh选项,我发现自己很困惑。

Does it simply use the only one generated by my current git-installation? 它只是使用我当前的git-installation生成的唯一一个吗?

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本身,从未使用过。

Local ssh-file 本地ssh文件

ssh-file on github github上的ssh文件

ex. 恩。 /users/$name/.ssh/github_rsa.pub /users/$name/.ssh/github_rsa.pub

For Mac users having trouble with ssh keys, I had to switch Android Studio to my "Native" SSH executable. 对于使用ssh密钥有问题的Mac用户,我不得不将Android Studio切换到我的“Native”SSH可执行文件。 Then it worked. 然后它奏效了。 See screenshot. 见截图。

设置AS以使用本机

A device has only one ssh-key for authenticating with GitHub. 设备只有一个用于通过GitHub进行身份验证的ssh密钥。

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对所有其他程序进行了修改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM