I was also having this error, and solved it by running this command:
path %path%;C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\mingw32\bin
This added the folder where my git-remote-https.exe file was stored.