Git-credential-manager-for-windows: The ServicePointManager does not support proxies with the socks5 scheme

Created on 18 May 2017  路  8Comments  路  Source: microsoft/Git-Credential-Manager-for-Windows

When trying to log in to a repository configured to use a SOCKS proxy (http.proxy=socks5://127.0.0.1:12000), the following error occurs, and git falls back to the basic authentication prompt:

fatal: NotSupportedException encountered.
   The ServicePointManager does not support proxies with the socks5 scheme.
help-wanted more-info-needed question

Most helpful comment

The proxy itself I'm using is not authenticated at all - on my network I have to access all services through a SOCKS5 proxy, which is supported by Git, however when accessing a remote with the credential manager enabled (said remote being GitHub, so it shows the GH authentication flow) this occurs - probably because .NET does not support SOCKS proxies by itself.

To reproduce:

ssh -D 3128 some-host # sets up a SOCKS proxy on local port 3128, through SSH
git config http.proxy socks5://127.0.0.1:3128 # set the HTTP proxy for the Git repository
git config credential.helper manager
git push # with the remote being a HTTP repo on GitHub

Noted is that the credential manager will give this error, then fallback to manual auth: entering the correct user/pass there will then work fine and use the SOCKS5 proxy for connecting to GitHub.

All 8 comments

What is "socks5"? What is the actual HTTP/S end-point you're attempting to reach?

The GCM is intended to support credentials for HTTP/S and SSH hosts. I've never even heard of "socks5".

You'll need to provide more information - thanks.

The proxy itself I'm using is not authenticated at all - on my network I have to access all services through a SOCKS5 proxy, which is supported by Git, however when accessing a remote with the credential manager enabled (said remote being GitHub, so it shows the GH authentication flow) this occurs - probably because .NET does not support SOCKS proxies by itself.

To reproduce:

ssh -D 3128 some-host # sets up a SOCKS proxy on local port 3128, through SSH
git config http.proxy socks5://127.0.0.1:3128 # set the HTTP proxy for the Git repository
git config credential.helper manager
git push # with the remote being a HTTP repo on GitHub

Noted is that the credential manager will give this error, then fallback to manual auth: entering the correct user/pass there will then work fine and use the SOCKS5 proxy for connecting to GitHub.

For microsoft/whoisj: https://en.wikipedia.org/wiki/SOCKS
BTW, proxy management in windows has been terrible for ages, especialy when using mixed authenticated http/https proxy, there is no way to specify global username and pw so that every app connect through the proxy.

nta, you can use polipo to convert your sock5 proxy to http/s, or you can use proxifier to force the proxy in any app externaly (but paid app). I know these are only workaround but it works.

@nta I'd be more than happy to accept a contribution which adds socks5 support to the GCM. 馃榾

@whoisj @nta @tiliarou Hi , guys , when I do "git config --global http.proxy host:8888" then do a "git pull" (pulling from VSTS) in local Git Bash in Windows, I got this below error:
"fatal: NotSupportedException encountered.
The ServicePointManager does not support proxies with the host scheme."

Does it have something to do with the way I installed the Git-2.17.1.2-64-bit.exe ?
I selected the option of "Use the OpenSSL library" and "Enable Git Credential Manager" in the installation screen.

Thanks,

A

Could be... I'm using standard git behind a proxy and it's working fine. I'm not using the microsoft git credential manager. Not sure this is the same issue of the OP here...

@AdrianNg please see our FAQ. It may provide a helpful answer.

Create an SSH key here: https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key
Then make sure you're using the right proxy. Also I think there's a formatting issue when you set your proxy. It should be:

http.proxy=http://host:port

Looks like git does not support socks5

Was this page helpful?
0 / 5 - 0 ratings