Intermittent failure using Git: unable to read askpass


Sometimes when I try to pull or push with a git repository, it fails with an error message. Other times it works fine. The first time I do this after launching IntelliJ, it always asks me for my password, and the pull or push always succeeds at this point. But after that initial success, it succeeds intermittently. Mostly it fails, but I try again and again until it succeeds. Here's the error message: 

Git Pull Failed
unable to read askpass response from 'C:\Users\munoz\.IntelliJIdea2016.3\system\tmp\intellij-git-askpass.bat'
failed to execute prompt script (exit code 1)
could not read Password for '': No error

If it can't find my password, I wish it would just ask me again. That would be more reliable than the current behavior.

Another poster, Tim van der Leeuw, fixed this problem by removing the spaces in the path to the temp directory, but I don't have any such spaces. Does anyone know how to fix an intermittent failure like this?

Comment actions Permalink

git-askpass is the tool that gets the password and transfers it to command-line git, if prompted. The error is returned by the git itself, becasue the intellij-git-askpass.bat fails to execute.

Please check if this comment helps:

Comment actions Permalink

git-askpass.bat in my case tried to execute removed java.exe by antivirus (false alarm).

I've copied java.exe by other name (java_old.exe etc) and fix name of java.exe to new name in git-askpass.bat.

Comment actions Permalink


I have the same issue.
While pushing my repositories to GitHub, below error occurred.

I have tried above solution but with no effect.

Below the event log that appeared.

Push failed
Failed with error: HttpRequestException encountered.
unable to read askpass response from 'C:\Users\Paweł\.IdeaIC2017.3\system\tmp\intellij-git-askpass.bat'
failed to execute prompt script (exit code 1)
could not read Username for '': No error



Comment actions Permalink


Looking a the path to the script, the issue could be

Comment actions Permalink

@Dmitriy Smirnov

Uunfortunately it didn't worked.

i had to re-install Intellij, git (just in case) and installed new Java SE 9.
Only this solved my problem.

Thanks anyway :)


Comment actions Permalink


The exception is thrown by git itself. So you don't have to re-install intellij (or whatever IDE you're using). Just re-install git and then "invalidate caches/restart" (File > invalidate caches/restart > invalidate caches/restart). This was how i solved the problem.

It may helps to set the maximum heap size of java to 512 MB.

  • Open the Control Panel
  • Go to System
  • Go to Advanced Systems Properties
  • Then Environment Variables
  • In System Variables, click Add
  • New Variable Name: _JAVA_OPTIONS
  • New Variable Value: -Xmx512M
  • Click OK

by setting -Xmx you're setting the maximum heap size. To set the minimum heap size you have to adjust it to -Xms. But this is just another unnecessary information.
Just reinstall git (simply download and install it again, DO NOT DELETE ANYTHING).


--Björn Pfoster

Comment actions Permalink

Try updating git (reinstalling new version on windows).

That worked for me

Comment actions Permalink

I have solved the problem , able to do Git Pull/Push successfully from Intellij:

No need to re-install Git/Intellij. Just go to IntelliJ-> File->Settings->Git-> uncheck "Path to Git Executable" ( This will automatically pop-up with C:/Users/<UserName>\AppData\....\Git.exe

Restart Intellij and try to do Git-> pull .

Note: Keeping credential-manager will help to avoid entering password again. 

 Let me know if you still face any issue


Please sign in to leave a comment.