Pkg.add/clone/update doesn't work behind corporate proxy unless run in Juno


#1

I tried to do

Pkg.update()

which works in Juno but not in Julia REPL nor VSCode. This is the message I get.

ERROR: METADATA cannot be updated. Resolve problems manually in C:\User\usernameA\.julia\v0.6\METADATA.
GitError(Code:ERROR, Class:OS, failed to send request: The server name or address could not be resolved
)

R used to have these type of issues years ago and you can fix it by running setinternet2() which tells R to use the same proxy as Internet Explorer. Somehow Juno is doing it correctly. Can we please implement the same in VSCode’s Julia extension?

It is extremely important to have this feature to get wider corporate adoption of Julia. For people like us who work behind a corporate proxy we need auto detection etc to enable a smooth experience. Wish I know more and can contribute a solution but “bug” reports like this is the best I can do. Also I don’t understand networking and corporate proxies/firewall enough to give a more precise definition.


#2

So we just host the julia REPL in VS Code. I don’t know why this doesn’t work, but the way to fix this is to get it to work in the REPL, and then it should also work in VS Code.


#3

What julia version are you using? 0.5+ has worked for using just by setting HTTP_PROXY and HTTPS_PROXY environment variables.


#4

i tried setting proxy once but it ddin’t support %winusser% or such global system variables on Windows. Also can’t these be auto detected like in Juno and in R? Most corporate user won’t know what a proxy is. So removing that friction can only help adoption.


#5

AFAIK Juno doesn’t do anything differently than the REPL or VSCode. You might want to check your environment variables though (compare ENV in Juno and the REPL) – Atom is kinda notorious for messing with those.


#6

it’s actually preferable to mess with it of that’s the case.