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?
How to get it working using Android Studio on Windows and PuttyGen for generating the key - for dummies: Export your private key using PuttyGen to file Conversions>Export OpenSSHKey. On the Windows machine where you have Android Studio installed go to your %USERPROFILE%/. ssh directory.
Just follow these 5 steps: Go to this address, and download Git for Windows, after the download install it with default settings. Open Git Bash that you just installed (Start->All Programs->Git->Git Bash) Type in the following: ssh-keygen -t rsa (when prompted, enter password, key name can stay the same)
First, launch Android Studio, then select the “File” menu and click the “Settings” menu item. In the settings screen, expand the “Version Control” option and click on “Git”. In the “Path to the Git executable” field enter the path to Git executable on your local machine.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With