Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Flutter and app store releases

Git in Android Studio cannot get a password from intellij-git-askpass

Your error

error: unable to read askpass response from '/home/<user>/.cache/Google/AndroidStudio<version>/tmp/intellij-git-askpass-local.sh'1 more line it can show

Fix it fast

Most common cause, 1 of 2

Android Studio's askpass script ran, but the IDE gave it no answer

In Settings > Version Control > Git, turn on Use credential helper, so the IDE stops overriding helpers and Git asks a helper you configure.

Fix
# a helper that ships with Git: keeps the password in memory for a while
git config --global credential.helper cache
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

error: unable to read askpass response from intellij-git-askpass-local.sh means Git asked Android Studio's askpass script for a username or password and got no answer. Either the IDE could not reply, or GIT_ASKPASS still names a script from an IDE session that has ended. Turn on Use credential helper in the Git settings, or unset GIT_ASKPASS.

  • Applies to Android Studio Rabbit 2 2026.2.2 and other IntelliJ-based IDEs, Git 2.56, HTTPS remotes on Bitbucket, GitHub or GitLab
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Print the three settings Git consults before it falls back to a terminal prompt: the GIT_ASKPASS variable, core.askPass and credential.helper. The output shows whether Git is wired to the IDE's script and whether any helper could answer instead.

Run this first
echo "GIT_ASKPASS=$GIT_ASKPASS"
git config --show-origin --get-all core.askPass
git config --show-origin --get-all credential.helper

Then find the line you see in this list and open its fix:

  1. 1Android Studio's askpass script ran, but the IDE gave it no answerThe push or pull is started from Android Studio (menu or built-in terminal), GIT_ASKPASS names the intellij-git-askpass script, and no credential.helper is set
  2. 2GIT_ASKPASS or core.askPass still points at a script from an IDE session that is goneThe error appears in a terminal outside the IDE, or the path in the message names an older IDE folder than the version you run now

What does the error look like?

  • error: unable to read askpass response from '/home/<user>/.cache/Google/AndroidStudio<version>/tmp/intellij-git-askpass-local.sh'
  • fatal: could not read Username for 'https://bitbucket.org':

Cause 1 of 2

Android Studio's askpass script ran, but the IDE gave it no answer

You seeThe push or pull is started from Android Studio (menu or built-in terminal), GIT_ASKPASS names the intellij-git-askpass script, and no credential.helper is set

Check

Git reports unable to read askpass response from the intellij-git-askpass script when that helper exits without printing a username or password. By default the IDE overrides any credential helper and answers Git's prompts itself through this script, so when the IDE side cannot reply, Git has nothing to read and moves on to a terminal prompt that a GUI push does not have.

Check
# inside Android Studio's terminal
echo "$GIT_ASKPASS"
git ls-remote origin

Fix

In Settings > Version Control > Git, turn on Use credential helper, so the IDE stops overriding helpers and Git asks a helper you configure. Set one helper for the machine, then push again and sign in once in the Git login dialog.

Fix
# a helper that ships with Git: keeps the password in memory for a while
git config --global credential.helper cache

Verify

Pushing again asks for credentials once, then works without the askpass error.

Verify
git push --dry-run

Confirmed by jetbrains.com

Did this fix it?

Cause 2 of 2

GIT_ASKPASS or core.askPass still points at a script from an IDE session that is gone

You seeThe error appears in a terminal outside the IDE, or the path in the message names an older IDE folder than the version you run now

Check

When the askpass error shows up outside Android Studio, Git is still being told to use the IDE's script. Git checks GIT_ASKPASS first, then core.askPass, then SSH_ASKPASS, and only then prompts on the terminal, so a value exported in a shell profile or written into the global Git config sends every prompt to a script that has no running IDE behind it.

Check
grep -n "ASKPASS" ~/.bashrc ~/.zshrc ~/.profile 2>/dev/null
git config --show-origin --get-all core.askPass

Fix

Remove the stale setting so Git falls through to a helper or the terminal prompt: unset the variable for this shell, delete the export from your profile, and drop core.askPass if it names the IDE script.

Fix
unset GIT_ASKPASS
git config --global --unset core.askPass

Verify

A new terminal prints an empty GIT_ASKPASS, and the next push prompts in the terminal or uses your helper.

Verify
echo "GIT_ASKPASS=$GIT_ASKPASS"
git push --dry-run

Confirmed by git-scm.com

Did this fix it?

How do I stop it coming back?

  • Configure one credential.helper per machine, so Git never depends on an IDE window being open to authenticate.
  • Never export GIT_ASKPASS in a shell profile; leave it to the tool that launches Git.
  • Keep core.askPass out of the global Git config unless a tool you control needs it, and check it after moving to a new IDE version.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: QistLock, Nuclear Home Video.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.