Whenever I try to clone a repository from bitbucket, it gives me following error:
fatal: unable to access 'https://[email protected]/user_name/repo_name.git/': Received HTTP code 501 from proxy after CONNECT
Can't understand what is the problem. I am copying git clone
command from bitbucket repository web. I have also set git http.proxy
but it didn't work.
Let me know if more information is required.
Thanks
A 501 HTTP isn’t a problem with your computer or web browser. It’s a problem with the web server or the site running on it. Most errors occur when the owner of a web server hasn't enabled a feature needed to complete a server request.
Obviously, your proxy doesn't support HTTP CONNECT tunneling, that's why it responds with HTTP 501 (Not implemented) code: A variation of HTTP tunneling when behind an HTTP Proxy Server is to use the "CONNECT" HTTP method.
The main types of HTTP proxy errors are 4xx and 5xx error codes. Receiving an error from the 4xx series indicates that the problem is from the client-side. It can be your request, browser, or the automation bot. It is a generic response indicating that there’s a problem with your sent request.
Sometimes a 501 is returned when a server has an unprecedented amount of traffic. Maybe you got a link that made it to a popular community on Reddit, and your site is slammed from the bump. Perhaps you’re the target of a DDoS attack.
Obviously, your proxy doesn't support HTTP CONNECT tunneling, that's why it responds with HTTP 501 (Not implemented)
code:
HTTP CONNECT tunneling
A variation of HTTP tunneling when behind an HTTP Proxy Server is to use the "CONNECT" HTTP method.
In this mechanism, the client asks an HTTP Proxy server to forward the TCP connecting to the desired destination. The server then proceeds to make the connection on behalf of the client. Once the connection has been established by the server, the Proxy server continues to proxy the TCP stream to and from the client. Note that only the initial connection request is HTTP - after that, the server simply proxies the established TCP connection.
This mechanism is how a client behind an HTTP proxy can access websites using SSL (i.e. HTTPS).
Not all HTTP Proxy Servers support this feature, and even those that do, may limit the behaviour (for example only allowing connections to the default HTTPS port 443, or blocking traffic which doesn't appear to be SSL).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With