cget icon indicating copy to clipboard operation
cget copied to clipboard

Installing packages behind proxy

Open ghost opened this issue 6 years ago • 5 comments

Hello, could you please tell me how can I use your library from behind a proxy? I think this issue may be related to Github,because this works cget install http://zlib.net/zlib-1.2.11.tar.gz ,however this doesn't cget install pfultz2/cget-recipes.

ghost avatar Nov 20 '17 20:11 ghost

Hello, could you please tell me how can I use your library from behind a proxy?

What kind of proxy?

however this doesn't

Do you have direct access to github?

pfultz2 avatar Nov 20 '17 20:11 pfultz2

Corporate proxy - Zscaler. I have http_proxy and https_proxy variables correctly set up, I can do git clone without problem, but somehow the way your application tries to download from Github the proxy doesn't like. Do you know what might be the problem?

ghost avatar Nov 20 '17 20:11 ghost

It doesn't use git, it just downloads the tarballs from https://github.com/pfultz2/cget-recipes/archive/master.tar.gz. Is that url not accessible?

pfultz2 avatar Nov 21 '17 03:11 pfultz2

I can access that url from curl, but it is redirecting somewhere else. I think we need to use directly the url which it redirects to in order to work behind proxy. I have tried to fix your code, but I am not that much familiar with Python,

C:\Users\jmasarb.JCPLC\Downloads\cget>cget install pfultz2/pkgconfig Downloading https://github.com/pfultz2/pkgconfig/archive/HEAD.tar.gz Download failed with error 500 for: //github.com/pfultz2/pkgconfig/archive/HEAD.tar.gz Failed to build package pfultz2/pkgconfig

ghost avatar Nov 21 '17 09:11 ghost

I am not sure why its sending 500, for a redirect it should send 302. Here is the line the that creates the github url. You could change it to what you think the url should be.

It also may be a problem with https with the proxy server. You can try adding the --insecure flag to force it to always use http instead of https.

pfultz2 avatar Nov 21 '17 10:11 pfultz2