Reputation: 11
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
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
Go to your Android Studio Settings: File --> Settings --> Version Control --> GitHub
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.
Then we need to re-add the account so click the +
sign to add it.
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.
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.
You should see a list of access tokens, and the top click generate new access token.
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.
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
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