Endless "Authentication failed" loop when updating packages

I’m getting stuck in an endless :Authentication failed" loop when I try to update my packages.

I first got warnings that the authorisation for the toll v2 files could not be done and started looking for answers to that. That led me to installing the PkgAuthentication package and editing my startup.jl file to:

try
	using Revise
catch
end

ENV["JULIA_PKG_SERVER"] = "https://pkg.juliahub.com/"

Base.eval(Module(), quote
    import PkgAuthentication
    PkgAuthentication.install();
end)

I first thought that there was a problem with removing the .pid file since I got the following warning:

Warning: attempting to remove probably stale pidfile
│   path = "/Users/stef/.julia/registries/.pid"
└ @ FileWatching.Pidfile /Library/Julia/Julia-1.11.app/Contents/Resources/julia/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:278

I manually removed the file but the warning comes back if I interrupt the loop and try again. Thus the .pid file gets recreated but seems to already be stale with the next try.

I also tried executing:

import PkgAuthentication
PkgAuthentication.authenticate();

This does not return an error but when I then try to update my packages I am again struck in an endless “Authentication failed” loop. No pid file warning though.

No clue what I need to do next.

I am using Julia 1.11.2 with VS code 1.96.4 (Julia language extension v1.138.1) on an M3 Mac running Mac OS 15.1.1

Anyone an idea?

Presumably you’re using JuliaHub’s package servers intentionally, rather than the (default) pkg.julialang.org public package servers? If not, then the first thing to do is stop using the JuliaHub package servers unless there’s a good reason to do so. If you do need to use them, that’s a different situation, but figure I should check that first.