PhpStorm Git Push to Remote not prompting for Key or Passphrase

According to the Git Integration when connecting to a remote repo via SSH PhpStorm should prompt for key and passphrase as mentioned below.

Reference: https://www.jetbrains.com/help/phpstorm/using-git-integration.html

"If authentication requires an SSH key with a passphrase, Git looks for it in the credential helper, and, if no credential helper is found, it returns a prompt to the IDE. If you have configured a password policy, PhpStorm looks for credentials in the passwords database. If there is no passwords database, it displays a prompt and you have to enter SSH key and a passphrase."

I am not being prompted for neither key nor passphrase. Instead I am displayed this message: "Push failed: Failed with error: Could not read from remote repository."

Please help, I have been researching about this all day. Some posts suggest that PhpStorm does not support keys with passphrase, but the official doc from JetBrains says it does.

18 comments
Comment actions Permalink

File | Settings | Version Control | Git - change Git executable to Native

1
Comment actions Permalink

Thanks for the tip, but that didn't work. I get "Failed with error: Could not read from remote repository."

0
Comment actions Permalink

In fact, the Native executable does not support passphrases indeed: https://youtrack.jetbrains.com/issue/IDEA-170013
But the built-in one does. What it didn't do until recently is asking for a passphrase in case the remembered one is wrong: https://youtrack.jetbrains.com/issue/IDEA-184450

Please try the latest EAP, would it ask you with the built-in SSH executable?
https://www.jetbrains.com/phpstorm/eap/

0
Comment actions Permalink

Hello there,

Same issue here. I've been using git & PHPStorm for months with the same key and passphrase, PHPStorm used to prompt and store my passphrase and everything worked well, but suddenly it stopped a few weeks ago. Same for my workmate.

I have edited my .ssh/config to use another key (with no passphrase) when connecting to github, I can successfully git pull / push in CLI but not with PHPStorm (Could not read from remote repository).

Following your instructions I have changed the GIT executable to Native and now it works, but the built-in integration is broken indeed.

Ben

0
Comment actions Permalink

@Eugene Morozov I tried the version you suggested but that didn't help either. 

0
Comment actions Permalink

Could you please reproduce that and share your idea.log (Help > Show log in...) afterward (you can use e.g. pastebin for that)?

0
Comment actions Permalink

In case anyone wants to know, I am using another Git GUI tool when pushing a remote repo with a password protected key. e.g. SourceTree

0
Comment actions Permalink

Omar, yours is private and can't be accessed.
Benny, please share the full log session, not only the tail of it.

0
Comment actions Permalink

Hello Eugene,

Here's what I did:

  • Clear log file
  • Open PhpStorm
  • Cmd+T to git fetch

Here's the result: https://pastebin.com/E9Lgzv7J

When I enter the terminal and type git pull origin master everything works properly.

 

0
Comment actions Permalink

Oh great, I didn't notice there was an update.

I upgraded right now and I confirm it works.

Thank you,

Ben

1
Comment actions Permalink

Sorry about that. Please try it now.

0
Comment actions Permalink

@Omar, there's authentication error - are you able to successfully run `git -c core.quotepath=false -c log.showSignature=false push --progress --porcelain production refs/heads/master:master ` from command line?

0
Comment actions Permalink

Omar, the log (AFAICS) is for 2017.3, and also it doesn't have a header that has important information in it.
Please run 2018.1 (the version I suggested), try to push and than re-collect and upload the full log (at least the last session, starting with IDE STARTED).
Thank you!

0
Comment actions Permalink

I updated to 2018.1. Here is the logs for that: https://pastebin.com/jXtXm3UA

0
Comment actions Permalink

@Vladimir When I run that command on the terminal I get the following error:

ssh: connect to host domain.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

0

Please sign in to leave a comment.