`raco pkg install` from behind proxy

Hi all, I installed Racket on my work machine. When I run raco pkg install I get the following error even though my HTTP_PROXY and HTTPS_PROXY env variables are set. How can I get around this?

C:\Users\n945186>raco pkg install remote-shell
Resolving "remote-shell" via https://download.racket-lang.org/releases/8.3/catalog/
make-ports: HTTP CONNECT failed: HTTP/1.1 407 authenticationrequired
  context...:
   C:\Program Files\Racket\collects\racket\contract\private\arrow-val-first.rkt:555:3
   C:\Program Files\Racket\collects\net\url.rkt:167:0: make-ports
   C:\Program Files\Racket\collects\net\url.rkt:202:0: http://getpost-impure-port
   C:\Program Files\Racket\collects\net\url.rkt:305:0: get-pure-port/headers
   C:\Program Files\Racket\collects\racket\contract\private\arrow-val-first.rkt:555:3
   C:\Program Files\Racket\collects\pkg\private\network.rkt:59:3
   C:\Program Files\Racket\collects\pkg\private\catalog.rkt:218:0: read-from-server
   C:\Program Files\Racket\collects\pkg\private\catalog.rkt:135:2: lookup-normally
   C:\Program Files\Racket\collects\pkg\private\prefetch.rkt:129:4
   C:\Program Files\Racket\collects\pkg\private\prefetch.rkt:128:2
   C:\Program Files\Racket\collects\pkg\private\catalog.rkt:132:0: package-catalog-lookup
   C:\Program Files\Racket\collects\pkg\private\catalog.rkt:200:0: package-catalog-lookup-source
   C:\Program Files\Racket\collects\pkg\private\clone-path.rkt:371:0: desc->repo
   C:\Program Files\Racket\collects\pkg\private\clone-path.rkt:65:2: add-repo-desc
   C:\Program Files\Racket\collects\pkg\private\clone-path.rkt:46:0: adjust-to-normalize-repos
   C:\Program Files\Racket\collects\pkg\private\install.rkt:913:3
   ...

2 Likes

FYI a similar question has been asked on the racket mailing list in 2014. Proxy support was not available then either

https://www.mail-archive.com/racket-users@googlegroups.com/msg21910.html

Nice, thanks for the pointer! Because I have limited faith in our mail archive, I'm going to paste the text of Jay's response back then:

Jay McCarthy writes:

 > The package system currently doesn't use proxies at all. Howver, you
 > should be able to go to
 > 
 > https://github.com/jbclements/sxml/tarball/648a97f4881a8ea2f0959cf26e80bfdfec93d181
 > 
 > in a web browser and download the archive manually then install it
 > "raco pkg install -n sxml the-file.tgz"


Done. That's a good enough workaround for my immediate needs, thanks!

 > I'll work on implementing proxy support in the future.

Great. The manual technique certainly breaks down when packages
trigger the download of lots of dependencies. Proxy support
would be great. The only even better solution would be a magic
incantation that makes all Web proxies in the world disappear ;-)

Konrad

Succeed with nekoray in Tun mode :grinning:

Windows 11, racket 8.11, nekoray 3.26