Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

The ServicePointManager does not support proxies with the socks5 scheme #431

Closed
nta opened this issue May 18, 2017 · 8 comments
Closed

The ServicePointManager does not support proxies with the socks5 scheme #431

nta opened this issue May 18, 2017 · 8 comments
Labels
help-wanted Indicates that an issue is worth addressing but there is insufficient internal resources to do so. more-info-needed question

Comments

@nta
Copy link

nta commented May 18, 2017

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.
@whoisj
Copy link
Contributor

whoisj commented May 18, 2017

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.

@nta
Copy link
Author

nta commented May 18, 2017

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.

@tiliarou
Copy link

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.

@whoisj whoisj added the help-wanted Indicates that an issue is worth addressing but there is insufficient internal resources to do so. label May 22, 2017
@whoisj
Copy link
Contributor

whoisj commented May 22, 2017

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

@whoisj whoisj closed this as completed Feb 7, 2018
@ghost
Copy link

ghost commented Jun 12, 2018

@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

@tiliarou
Copy link

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...

@whoisj
Copy link
Contributor

whoisj commented Jun 12, 2018

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

@ll-O-ll
Copy link

ll-O-ll commented Feb 25, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help-wanted Indicates that an issue is worth addressing but there is insufficient internal resources to do so. more-info-needed question
Projects
None yet
Development

No branches or pull requests

4 participants