Android Studio - Push failed: fatal: Could not read from remote repository

Michel Feinstein picture Michel Feinstein · Jul 11, 2014 · Viewed 51.8k times · Source

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 Android Studio every time I try to push the project it says

Push failed: fatal: Could not read from remote repository.

Does anyone have a clue about what could be happening?

Answer

Nicolas Zozol picture Nicolas Zozol · Jan 31, 2016

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