I've been struggling with that issue for a couple days now.
I'm unable to connect to my Git project (stored in VisualStudio.com) from a specific computer (it works on my second PC). Whenever I try to Sync or Clone my repository, VS2017 asks for my user credentials (twice) and the I get the following error :
Error: cannot spawn askpass: No such file or directory Error encountered while cloning the remote repository: Git failed with a fatal error. could not read Username for 'https://.visualstudio.com': terminal prompts disabled
Can't remember if I changed anything that could've caused that...
git", instead of "https://github.com/user/Repo.git". To fix that, go to Team Explorer → Settings → Repository Settings → Remotes → Edit, and change "git@" to "https://" and ":" to "/". Save this answer.
Entering Git Username and Password in Remote URL To prevent Git from asking for your username and password, you can enter the login credentials in the URL as shown. The main drawback of this method that your username and password will be saved in the command in the Shell history file.
It’s mainly caused by the credentials have been remembered by Credential Manager. You should remove the credentials for xxx.visualstudio.com which have been stored in Credential Manager.
Such as if the pc’s OS is windows, you can open Credential Manager -> Windows Credentials -> under Generic Credentials -> remove the credentials like git:https://xxx.visualstudio.com.
Then clone again, git will let you input the credential for the repo. After inputing the username(email address) and password which can access the VSTS account, the repo should be cloned successful.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With