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 'https://munoz@bitbucket.xx.xx.xxx.com': 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?
Please sign in to leave a comment.
Possibly related issues:
https://youtrack.jetbrains.com/issue/IDEA-150555
https://youtrack.jetbrains.com/issue/IDEA-154206
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: https://youtrack.jetbrains.com/issue/IDEA-150555#comment=27-1342542
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.
Hey
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.
*guote
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 'https://github.com': No error
*unquote
@Kaliszewskipawel
Looking a the path to the script, the issue could be https://youtrack.jetbrains.com/issue/IDEA-154206
@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 :)
--Pawel
@Pawel
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.
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
Try updating git (reinstalling new version on windows).
That worked for me
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
Apologies, would you help me navigate to: "Just go to IntelliJ-> File->Settings->Git->"
I have: DataGrip 2021.2.4
Build #DB-212.5457.41, built on October 8, 2021
When I do a pull inside DataGrip i get "unable to read askpass response from .... etc"
git pull works okay from Powershell.
thanks
Alex
Alex, it's worth checking how git is working in cmd.exe
You may have completely different configuration in cmd.exe for git, and IDE relies on a git that is running in cmd.exe
For DataGrip settings should be no different from IntelliJ, so press File -> Settings -> Git
Hi Ruslan, thanks for your response.
I did resolve this re-reading Manish Dubey, and as you suggested above:
File -> Settings -> Version Control -> Git / Check "User credential Helper"
Worked a treat.
thanks Alex
i have solved the problem disabling and enabling the git plugin, and restarting intellj with an invalidate cache.
Did fix the issue to be able to provide passphrase to git
Thanks Taylorpah, your suggestion has helped to solved the issue!
I've created a user just to thank Taylorpah , this has helped to solve the issue
Having the same issue, none of the proposed solutions I've encountered have worked so far.
PhpStorm 2023.3.4 via remote ssh on linux