TFS 2013 Git push VS 2017 Forbidden error-403
unable to access. requested url returned error: 403
I got this error while trying to push my local git repository to on-prem TFS 2013 server. I got same error from VS 2017 and command line.
After spending lot of time on playing around with global config settings, I figured out that the
issue is caused by internal proxy server.
Cleared git credentials from Windows Credentials Manager (as mentioned in https://mcmap.net/q/1914083/-visual-studio-2013-github).
But problem still did not go away. So I added NO_PROXY to environment variables as mentioned in (Only use a proxy for certain git urls/domains?)
NO_PROXY
my_internal_tfs,localhost,127.0.0.1
This worked like a charm. make sure to close and re-open Visual studio or command prompt after changing environment variables.
Below are some useful links I found about git credential manager. Hope this may be helpful for someone.
https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage
https://github.com/Microsoft/Git-Credential-Manager-for-Windows
https://github.com/Microsoft/Git-Credential-Manager-for-Windows/blob/master/Docs/Faq.md#q-i-thought-microsoft-was-maintaining-this-why-does-the-gcm-not-work-as-expected-with-tfs