[SOLVED] IntelliJ IDEA, git, ssh: Fetch failed: Could not read from remote repository

Problem
Any remote Git operation made with IntelliJ IDEA does not work, but the same operation performed directly from command line works correctly.

 

Cause
The problem is that IntelliJ IDEA uses the built-in version of git and it does not have an access to any of ssh keys located in ~/.ssh/ directory.

 

Solution
The idea of the solution is to switch Idea’s SSH executable mode to use native OS SSH.
Go to File->Settings->Version Control->Git and change SSH executable to Native.

0 0 vote
Article Rating
Subscribe
Notify of
guest
12 Comments
oldest
newest most voted
Inline Feedbacks
View all comments
Gilbert
Gilbert
1 year ago

This solution did not work, I am still getting the “couldn’t authorize’ error. I am using intellij 12

Mizz
Mizz
7 months ago
Reply to  lukasz.ciesla

has anyone successfully solved this issue? I have successfully used git from cmd line but having this issue in IntelliJ

Uday Dattani
Uday Dattani
1 year ago

This was really helpful. Thanks a lot!

Axel
Axel
1 year ago

Where is the “SSH executable” drop down in the latest version(s) of PhpStorm 2019.1.x? Why was it removed?

Landon Gravat
11 months ago
Reply to  Axel

it was removed by JetBrains because the native is now the default, andthey dont intend for you to change it, because they removed the other option

Axel
Axel
11 months ago
Reply to  Landon Gravat

Thanks for clarifying. Regards

Elizaveta
Elizaveta
1 year ago

Im using WebStorm and it works for me. Thanks a lot!

Gokmen Sokmen
Gokmen Sokmen
1 year ago

when I just open the panel ı could not see ssh executable on my ide.?

Max
Max
10 months ago

tnx man it works!

Huluvu424242
8 months ago

Hello, this menue is missing in idea 2019.2.4 community edition 🙁
Setting path to C:\msys64\usr\bin\git.exe does not work.