I have a git project at Android Studio and a remote at BitBucket and I changed it to use SSH instead of HTTPS. I can make everything work using Atlassian\'s SourceTree, but in A
I got the same issue. Turns out it matters how you run Android Studio. If you run it with normal privileges from terminal or sth, it cannot read local files that it has to in order to push repository.
Solution might just be to restart Android Studio with more privileges than it currently has.
There is two ways for Git SSH verification in Android Studio or IntelliJ, changing via: settings - Version Control - Git - SSH excuteable - "Built-in" or "Native"
ssh-keygen -t rsa
Anyway, you can use the both way after you add the correct Public key in you acoount in repository hosting service.
This is probably an Intellij problem. Your key are managed natively by ssh, and Intellij has it's own ssh program.
Go to the settings, search git->ssh executable then choose native
As seen here : git with IntelliJ IDEA: Could not read from remote repository
I have met this problem, and finally I have solved it. And there are two important points for setting: In the android studio: File-Settings-GitHub: not to choose "Clone git repositories using ssh" In the android studio: File-Settings-Git: Choose "Built-in" for "SSH executable"
and for the SSH that I already have in the account of GitHub, is the one that I have in the android studio, I forget how to find the SSH in the android studio, But you can find it by the other way
Regenerate your public ssh key and add it to your git hub repository.
ssh-keygen -t rsa
It worked in my case.
Go to Settings > Version Control > Git. Make sure SSH executable is set to “Native.”
If it's already set, switch back to “Built-in,” apply it, and then again switch back to “Native".