Search code examples
gitvisual-studio-2017

git fatal: UriFormatException encountered. actualUrl


I keep getting this error whether I'm syncing in Visual Studio 2017 or just doing a PUSH using Git Bash. It looks like the PUSH/PULL commands work, but I'm still seeing this error and would like for it to go away.

My Git Credential Manager for Windows is version 1.14.0 My Git version is 2.16.1.windows.4

I have uninstalled both Git and Visual Studio 2017 and re-installed and keep getting the same error. I am using VSTS for my Git repository so that is where the URL is coming from.

Here is a look at the actual error: Error encountered while pushing to the remote repository: Git failed with a fatal error. UriFormatException encountered. actualUrl

Thank you in advance for any suggestions!


Solution

  • Admittedly my problem ended up being an oversight on my part. We were getting 443 related errors while connecting our projects to VSTS. The fix was to add entries in our C:\Users\.gitconfig file to use a proxy server.

    The GOOD entries look like this:

    [http] proxy = http://username:[email protected]:XXXX

    [https] proxy = http://username:[email protected]:XXXX

    In my original entries I accidentally left a <> in the url string, which is why I was getting the UriFormatException error.

    Bad Entry:

    proxy = http://username:<password>@XXX.XXX.X.XXX:XXXX

    Hope this helps someone else catch this silly oversight!