Android studio git使用私钥 [英] Android studio git using private key
问题描述
有一个git存储库的地址。
另外我有一个开放ssh格式的私钥。
Android Studio中的git是否可以使用它?
我试图搜索一些信息,但此时没有运气。
感谢您提供任何有用的信息!
编辑。我的步骤:
1.我将我的私钥放入.ssh文件夹(用户/用户)。
2.在Android工作室我运行:文件 - 设置 - 版本控制 - Git并把路径放到Git可执行文件。
3.然后VCS - 从vesrion控制结帐 - Git。我把库地址放在那里。 p>
但我没有用户名和密码,只有密钥。
如果我尝试:
获得以下服务:
Android Studio如何知道它应该使用我的私钥而不是标准的id_rsa文件? >好的,终于搞定了ing!
我所做的 - 切换到.ssh文件夹,然后替换 id_rsa
键的内容(据我所知,这是默认的ssh我的 ssh键的内容
。
还是不知道方式,怎么可以我将Android Studio指向我的 ssh键
,但以这种方式工作。
A have an address of git repository.
Also I have a private key in open-ssh format.
Is it possible for git in Android Studio to use it?
I tried to search some info, but no luck at this time.
Thanks for any useful information!
Edit. My steps:
1. I put my private key in .ssh folder (Users/user).
2. In Android studio I run: File - Settings - Version Control - Git and put the path to Git executable.
3. Then VCS - Checkout from vesrion control - Git. I put repository address there.
If I continue here, there is:
But I don't have username and password, only key.
If I try:
got the following:
And how Android Studio would know, that it should take my private key instead of standard id_rsa file?
Ok, finally got it working!
What I did - switched to .ssh folder, then replaced contents of id_rsa
key (as I understand, this is default ssh key of Android Studio) with contents of my ssh key
.
Still don't know the way, how can I point Android Studio to my ssh key
, but in such way it works.
这篇关于Android studio git使用私钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!