Not able to update for almost one week

(@v1.7) pkg> up
    Updating registry at `C:\Users\ytian\.julia\registries\General.toml`
┌ Error: Some registries failed to update:
│     — C:\Users\ytian\.julia\registries\General.toml — failed to download from https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/13ce9d9c2827ed305c5f056e0865d72b9785af23. Exception: HTTP/1.1 301 Moved Permanently (Operation timed out after 30006 milliseconds with 0 out of 0 bytes received) while requesting https://pkg.julialang.org/registry/23338594-aafe-5451-b93e-139f81909106/13ce9d9c2827ed305c5f056e0865d72b9785af23
└ @ Pkg.Registry C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.7\Pkg\src\Registry\Registry.jl:450
  No Changes to `C:\Users\ytian\.julia\environments\v1.7\Project.toml`
  No Changes to `C:\Users\ytian\.julia\environments\v1.7\Manifest.toml`
1 Like

Did you try using Bash:

export JULIA_PKG_SERVER_REGISTRY_PREFERENCE="eager"

or on Windows command prompt:

set JULIA_PKG_SERVER_REGISTRY_PREFERENCE="eager"

(Note: no space before and after ‘=’)
before launching Julia?

Is this 1.7 specific?

What does this env var do?

See the documentation of JULIA_PKG_SERVER_REGISTRY_PREFERENCE, but I doubt this has anything to do with the reported issue which is about downloading any registry.

It was reported that downloading a specific registry fails, which can mean that a server or proxy is down. Using a different server might fix the issue.

That’s the thing: JULIA_PKG_SERVER_REGISTRY_PREFERENCE doesn’t change a server or a proxy.

If that would be true, why does the documentation says:

Users behind restrictive firewalls that do not allow downloading from arbitrary servers should not use the eager flavor.

This indicates that the eager registry is served by different servers.

That documentation doesn’t refer to downloading of the registry itself. What may happen if you use the eager registry is that some of the package versions are not yet available to be downloaded from the package server, in which case Pkg falls back to fetching them directly from their repositories, which is referred to as “arbitrary servers”. In almost all cases this means github, but the point is that it’s somewhere else than the package server.

2 Likes

still doesn’t work

no, my Julia v1.10.7 on the same machine has the same problem

In which country are you? Are you behind a corporate firewall?

The servers are all up: https://status.julialang.org/