I had an issue with GitHub when trying to push or pull.
It was asking me to log in every time, but still failing with an error.
Here are the error messages I was getting from all 3 ways I work with GitHub:
Git failed with a fatal error. HttpRequestException encountered. An error occurred while sending the request. cannot spawn askpass: No such file or directory could not read Username for 'https://github.com': terminal prompts disabled
fatal: HttpRequestException encountered. An error occurred while sending the request. Username for 'https://github.com':
fatal: HttpRequestException encountered. An error occurred while sending the request. remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/username/reponame.git/'
It is my understanding that GitHub has switched to using TLS 1.2, which is causing this error when your program is still trying to connect to GitHub using TLS 1.0.
Firstly you need to download and install the latest version of the Git Windows Credential Manager.
Here is the link to it on GitHub. https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/latest
Restart your machine.
Enter a git command in the command line and you will be prompted to login again.
If you still get the same fatal error, you will need to update Git by downloading the latest version from here:
Enter a git command in the command line and you will be prompted to login again. The problem should be solved now and you should be able to carry on working as normally.
If you are using the GitHub extension for Visual Studio, click on the Tools menu, click on Extensions and Updates, and you may have an update for the GitHub Extension and possibly one for Visual Studio itself. Install these and it should solve the issue for you.
This post gives you the commands you will need to keep your fork up to date with the master reposito…Read Post
This post shows you how to solve the git error fatal: unable to access '\/.config/git/configRead Post