Saharsh
Saharsh

Reputation: 11

Clone failed in Android Studio: Illegal value of environment variable value GIT_ASKPASS_TOKEN

I got the following error when trying to clone project from gitlab in android studio.

Failed to start Git process Illegal value of environment variable value GIT_ASKPASS_TOKEN:

Git version is 2.26.2, Android studio 3.5

Upvotes: 1

Views: 2068

Answers (2)

bloo
bloo

Reputation: 1560

I know its an old question but I had this problem and found what may be a better fix because you do not have to delete anything.

STEPS

  1. Go to your Android Studio Settings: File --> Settings --> Version Control --> GitHub

  2. What you should see here is a list of GitHub accounts linked to your IDE, so if you see your account there you should remove it by selecting it and clicking the - sign on the right of the list.

  3. Then we need to re-add the account so click the + sign to add it.

  4. So now you should have a dialog up to authenticate with github. Instead of adding your username and password, select the Use Token option on the top right. This will bring up an input field for a GitHub access token.

  5. So now we need to generate the token. Go to your GitHub account, click on your profile and go to Settings --> Developer Settings --> Personal Access Tokens.

  6. You should see a list of access tokens, and the top click generate new access token.

  7. Note: the input field on the dialog specifies the permissions it will need from the access token, so make sure that when you generate the token you select the appropriate permission and hit generate.

  8. Finally home and dry, copy the token and paste it in the field, and hit login...

RESULT

Haven't had the GIT_ASKPASS_TOKEN issue since

Upvotes: 1

Saharsh
Saharsh

Reputation: 11

Finally I found the solution for this problem which is to delete the folder .AndroidStudio3.6 in the directory C:\Users\WIN 10.AndroidStudio3.6 and then normally open Android Studio OR simply just reinstall Android Studio.

Upvotes: 0

Related Questions