Repository error in Julia 1.6.7

(@v1.6) pkg> up
    Updating registry at `C:\Users\photo\.julia\registries\General`
ERROR: GitError(Code:ENOTFOUND, Class:Repository, could not find repository from 'C:\Users\photo\.julia\registries\General')
Stacktrace:
  [1] macro expansion
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\error.jl:110 [inlined]
  [2] LibGit2.GitRepo(path::String)
    @ LibGit2 C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\LibGit2\src\repository.jl:11
  [3] update_registries(ctx::Pkg.Types.Context, regs::Vector{Pkg.Types.RegistrySpec}; force::Bool)
    @ Pkg.Types C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\Types.jl:1195
  [4] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:243
  [5] up(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:80
  [6] up(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\API.jl:78
  [7] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:408
  [8] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:386
  [9] do_cmd
    @ C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:377 [inlined]
 [10] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
    @ Pkg.REPLMode C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\Pkg\src\REPLMode\REPLMode.jl:550
 [11] #invokelatest#2
    @ .\essentials.jl:708 [inlined]
 [12] invokelatest
    @ .\essentials.jl:706 [inlined]
 [13] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
    @ REPL.LineEdit C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\LineEdit.jl:2441
 [14] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
    @ REPL C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.6\REPL\src\REPL.jl:1126
 [15] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
    @ REPL .\task.jl:417

(@v1.6) pkg>

I also have Julia 1.7.3 in the same system, and it works well. Thanks.

What if you do delete the directory C:\Users\photo\.julia\registries\General? That should let the package manager use the sparse registry instead of the git repo one.

1 Like

It works for me:

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.7 (2022-07-19)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.6) pkg> up
  Installing known registries into `~/.julia`
       Added registry `General` to `~/.julia/registries/General`
    Updating registry at `~/.julia/registries/General`
  No Changes to `~/.julia/environments/v1.6/Project.toml`
  No Changes to `~/.julia/environments/v1.6/Manifest.toml`

(@v1.6) pkg> 

Would that delete all the packages I have installed in both my 1.6.7 and 1.7.3? Actually, all the installed packages in my 1.6.7 can be listed normally and even work well with using, but just I cannot do update or add new packages.

If you delete the registry folder that should not affect the packages you have installed. To be safe, you can make a backup first.

1 Like

It works! Thank you guys!

1 Like