Resolve using local package and local_julia_registry

I have a Windows computer which is working fine and a Raspberry PI 4 with 8 Gig memory on Raspberry PI OS, a Debian derivative.

On the Raspberry PI git always asks for a user name and password, where the password is the git token that I have generated a while back. This is annoying and maybe contributing to the problem outlined below.

I have a number of local packages in the dev folder. And I have another package that depends upon a number of these packages. Let’s call the main package Foo and the packages it depends on Bar and Post. There are more that Foo depends upon, but they seem to have already migrated to the package folder. (I removed them from time to time.) When I renamed the Manifest.toml to Manifest-v1.11.toml and then did a ] resolve from Julia 1.10.6, the package manager wanted to download one of the dev packages that had not migrated to the package folder, and presumably put it in the package folder. It was already in the dev folder.


(Foo) pkg> resolve
     Cloning [41c3b3d0-c13d-4b9d-98b9-7286c3ea28ed] Bar from https://github.com/Spectrum-Tec/Bar.jl
Username for 'https://github.com': jakezw
                                          ERROR: ArgumentError: invalid value for Enum Code: -30848
Stacktrace:
  [1] enum_argument_error(typename::Symbol, x::Int32)
    @ Base.Enums ./Enums.jl:93
  [2] Code
    @ ./Enums.jl:212 [inlined]
  [3] LibGit2.Error.GitError(err_code::Int32)
    @ LibGit2.Error ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/error.jl:100
  [4] macro expansion
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/error.jl:112 [inlined]
  [5] clone(repo_url::SubString{String}, repo_path::String, clone_opts::LibGit2.CloneOptions)
    @ LibGit2 ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/repository.jl:459
  [6] clone(repo_url::SubString{String}, repo_path::String; branch::String, isbare::Bool, remote_cb::Ptr{Nothing}, credentials::LibGit2.CachedCredentials, callbacks::Dict{Symbol, Tuple{Ptr{Nothing}, Any}})
    @ LibGit2 ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:585
  [7] clone
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:558 [inlined]
  [8] clone(io::Base.TTY, url::String, source_path::String; header::String, credentials::Nothing, kwargs::@Kwargs{isbare::Bool})
    @ Pkg.GitTools ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:121
  [9] clone
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:88 [inlined]
 [10] #ensure_clone#2
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:74 [inlined]
 [11] ensure_clone
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:70 [inlined]
 [12] install_git(io::Base.TTY, uuid::Base.UUID, name::String, hash::Base.SHA1, urls::Set{String}, version_path::String)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:677
 [13] download_source(ctx::Pkg.Types.Context; readonly::Bool)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:904
 [14] download_source
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:790 [inlined]
 [15] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel; skip_writing_project::Bool, preserve::Nothing)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1540
 [16] up
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1519 [inlined]
 [17] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, preserve::Nothing, update_registry::Bool, skip_writing_project::Bool, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:351
 [18] up
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:326 [inlined]
 [19] up
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:164 [inlined]
 [20] #resolve#143
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:357 [inlined]
 [21] resolve
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:356 [inlined]
 [22] resolve(; io::Base.TTY, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:355
 [23] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:409
 [24] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:390
 [25] do_cmd
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:380 [inlined]
 [26] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:557
 [27] #invokelatest#2
    @ ./essentials.jl:892 [inlined]
 [28] invokelatest
    @ ./essentials.jl:889 [inlined]
 [29] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2656
 [30] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1312
 [31] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:386

(Foo) pkg>

I would like to format the error trace as a summary but don’t know how to do that.

Up to error 15 in the stack trace the same error exists for dev Bar with the major exception that it was asking to retrieve Post instead of Bar as shown below.

(Foo) pkg> dev Bar
   Resolving package versions...
     Cloning [49faafe7-1138-4428-b534-1ec25822d20a] Post from https://github.com/Spectrum-Tec/Post.jl
Username for 'https://github.com': jakezw
                                          ERROR: ArgumentError: invalid value for Enum Code: -30848
Stacktrace:
  [1] enum_argument_error(typename::Symbol, x::Int32)
    @ Base.Enums ./Enums.jl:93
  [2] Code
    @ ./Enums.jl:212 [inlined]
  [3] LibGit2.Error.GitError(err_code::Int32)
    @ LibGit2.Error ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/error.jl:100
  [4] macro expansion
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/error.jl:112 [inlined]
  [5] clone(repo_url::SubString{String}, repo_path::String, clone_opts::LibGit2.CloneOptions)
    @ LibGit2 ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/repository.jl:459
  [6] clone(repo_url::SubString{String}, repo_path::String; branch::String, isbare::Bool, remote_cb::Ptr{Nothing}, credentials::LibGit2.CachedCredentials, callbacks::Dict{Symbol, Tuple{Ptr{Nothing}, Any}})
    @ LibGit2 ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:585
  [7] clone
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:558 [inlined]
  [8] clone(io::Base.TTY, url::String, source_path::String; header::String, credentials::Nothing, kwargs::@Kwargs{isbare::Bool})
    @ Pkg.GitTools ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:121
  [9] clone
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:88 [inlined]
 [10] #ensure_clone#2
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:74 [inlined]
 [11] ensure_clone
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:70 [inlined]
 [12] install_git(io::Base.TTY, uuid::Base.UUID, name::String, hash::Base.SHA1, urls::Set{String}, version_path::String)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:677
 [13] download_source(ctx::Pkg.Types.Context; readonly::Bool)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:904
 [14] download_source
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:790 [inlined]
 [15] develop(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1412
 [16] develop
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Operations.jl:1402 [inlined]
 [17] develop(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; shared::Bool, preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::@Kwargs{io::Base.TTY})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:225
 [18] develop(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
 [19] develop(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:148
 [20] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:412
 [21] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:390
 [22] do_cmd
    @ ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:380 [inlined]
 [23] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/REPLMode/REPLMode.jl:557
 [24] #invokelatest#2
    @ ./essentials.jl:892 [inlined]
 [25] invokelatest
    @ ./essentials.jl:889 [inlined]
 [26] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/LineEdit.jl:2656
 [27] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:1312
 [28] (::REPL.var"#62#68"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL ~/.julia/juliaup/julia-1.10.6+0.aarch64.linux.gnu/share/julia/stdlib/v1.10/REPL/src/REPL.jl:386

(Foo) pkg> 

So here I ask for dev Bar and the package manager tries to serve up dev Post by trying to retrieve it from github, when it is already in my dev folder. So this seems like two issues.

At this point I am wondering if I should uninstall and reinstall some components, but I don’t really understand what is happening.

It’s hard for me to say what’s going on but I would try to see whether setting the environment variable JULIA_PKG_USE_CLI_GIT to true makes a difference, cf. LocalRegistry.jl/docs/ssh_keys.md at master · GunnarFarneback/LocalRegistry.jl · GitHub.

1 Like

Exiting Julia and setting the environment variable plus changing the .git/config file as follows:

url = https://github.com/Spectrum-Tec/TachProcessing.jl  # original
url = git@github.com:Spectrum-Tec/TachProcessing.jl      # current

did make a difference. It still asks for username and password, but it accepts them now.

However there is still the Bar Post Foo issue. Note that I ask to dev Bar, and it says it is cloning Post. But it is cloning from Foo.

(data) pkg> dev Bar
   Resolving package versions...
     Cloning [49faafe7-1138-4428-b534-1ec25822d20a] Post from https://github.com/Spectrum-Tec/Post.jl
Username for 'https://github.com': jakezw
Password for 'https://jakezw@github.com':     Fetching: [>                                           Installed Winding âââââââââââââââ v0.1.0
     Cloning [8dcd7bc5-9351-4069-b6f5-927426629c70] Foo from https://github.com/Spectrum-Tec/Foo.jl
Username for 'https://github.com': 

I got so frustrated that i removed all my .toml files and started again. I had to change the url = back to https:// to make this work. I think I am back at a usable system.

Hard to say anything about that without having an example I can reproduce myself.