As of R2021a, we use a different library for Git. Its behavior matches command-line Git more closely and it will look up environment variables and items in the Git configuration. This error results from Git trying to communicate with the wrong remote URL. Refer to the steps below to resolve the error.
1. Check the environment variables
One reason for this error may be that an environment variable such as HTTP_PROXY / HTTPS_PROXY is set, so a good first step is to check the environment variables. You can check all environment variables by executing the following in the Windows Command Prompt:
Alternatively, you can check, modify, or delete environment variables in the Advanced System Settings. To open Advanced System Settings, search for it in the Start Menu. Then, you can access the list of environment variables in your system by clicking on the "Environment Variables..." button.
Deleting these environment variables should resolve the error.
2. Check the git config file
If the above environment variables are not set, "remote.origin.proxy" could be set in the git config file causing the same issue. Note that "remote.origin.proxy" will cause such an issue even if it is set equal to nothing. Running the following might resolve the error in this case:
git config --global --unset remote.origin.proxy
3. Set the NO_PROXY environment variable
In case some of the other applications you are using require the HTTP_PROXY / HTTPS_PROXY environment variables, you can set a new environment variable NO_PROXY to:
You can set this environment variable in the "Environment Variables" window of the Advanced System Settings.