Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio fails to push to GitHub

(I am aware of prior threads, this seems to be a new problem) I upgraded Android Studio to 2021.2.1 patch 1 a couple of weeks ago. Since then, communication with GitHub is flaky:

I cannot git push; I have to close the SDK, get back in, and then -- sometimes -- it works. Error message I get:

error: unable to read askpass response from 'C:\Users\myname\AppData\Local\Google\AndroidStudio2021.2\tmp\intellij-git-askpass-local.sh'
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No such file or directory

Git > Show Git Log -- shows 1 line of commit from 2 months ago, doesn't see anything.

Tried generating a new token (with access to EVERYTHING) -- no sugar.

Until I upgraded everything worked wonderfully. Anyone knows what's going on? Thank you!

like image 250
Yanay Lehavi Avatar asked Apr 21 '26 00:04

Yanay Lehavi


1 Answers

That was mentioned before, with as a (bad) workround embedding the token in the URL.

Another workaround would to try and use an SSH URL instead of an HTTPS one (which involved the Git credential helper used for providing HTTPS credentials)

As reported by the OP Yanay Lehavi in the comments, a git config --global --unset credential.helper also avoid said credential helper.

like image 56
VonC Avatar answered Apr 23 '26 21:04

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!