Julia 1.8 on Windows fails to handle properly the Git meta credential helper. In .gitconfig
:
[credential "helperselector"]
selected = <no helper>
Introduced in Git for Windows v2.23.0.
I wonder if Julia is being tested with this newest Git?
Julia 1.8 on Windows fails to handle properly the Git meta credential helper. In .gitconfig
:
[credential "helperselector"]
selected = <no helper>
Introduced in Git for Windows v2.23.0.
I wonder if Julia is being tested with this newest Git?
The package manager uses libgit2 for git functionality.
It seems to me that the error originates here:
function split_cfg_entry(ce::ConfigEntry)
key = unsafe_string(ce.name)
# Determine the positions of the delimiters
subsection_delim = something(findfirst(isequal('.'), key), 0)
name_delim = something(findlast(isequal('.'), key), 0)
section = SubString(key, 1, subsection_delim - 1)
subsection = SubString(key, subsection_delim + 1, name_delim - 1)
name = SubString(key, name_delim + 1)
value = unsafe_string(ce.value)
return (section, subsection, name, value)
end
which appears to be pure Julia code. Wouldn’t you agree?
Please post what you did and the error message that resulted.
julia> using Pkg; Pkg.update();
Updating registry at `C:/Users/pkonl/SublimeJulia_1.8/assets/.julia-1.8.0-depot\registries\General.toml`
Updating git-repo `https://github.com/PetrKryslUCSD/HelmBEM.jl.git`
ERROR: AssertionError: name == "helper"
Stacktrace:
[1] credential_helpers(cfg::LibGit2.GitConfig, cred::LibGit2.GitCredential)
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\gitcredential.jl:224
[2] fill!(cfg::LibGit2.GitConfig, cred::LibGit2.GitCredential)
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\gitcredential.jl:148
[3] GitCredential
@ C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\gitcredential.jl:30 [inlined]
[4] authenticate_userpass(libgit2credptr::Ptr{Ptr{Nothing}}, p::LibGit2.CredentialPayload)
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\callbacks.jl:196
[5] credentials_callback(libgit2credptr::Ptr{Ptr{Nothing}}, url_ptr::Cstring, username_ptr::Cstring, allowed_types::UInt32, p::LibGit2.CredentialPayload)
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\callbacks.jl:331
[6] credentials_callback(libgit2credptr::Ptr{Ptr{Nothing}}, url_ptr::Cstring, username_ptr::Cstring, allowed_types::UInt32, payloads::Dict{Symbol, Any})
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\callbacks.jl:354
[7] macro expansion
@ C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\error.jl:108 [inlined]
[8] fetch(rmt::LibGit2.GitRemote, refspecs::Vector{String}; options::LibGit2.FetchOptions, msg::String)
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\remote.jl:299
[9] fetch(repo::LibGit2.GitRepo; remote::String, remoteurl::SubString{String}, refspecs::Vector{String}, credentials::Nothing, callbacks::Dict{Symbol, Tuple{Ptr{Nothing}, Any}})
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\LibGit2.jl:293
[10] fetch(io::Base.TTY, repo::LibGit2.GitRepo, remoteurl::String; header::Nothing, credentials::Nothing, refspecs::Vector{String}, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.GitTools C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\GitTools.jl:167
[11] (::Pkg.Types.var"#47#48"{Pkg.Types.Context, Pkg.Types.PackageSpec, String})(repo::LibGit2.GitRepo)
@ Pkg.Types C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\Types.jl:727
[12] with(f::Pkg.Types.var"#47#48"{Pkg.Types.Context, Pkg.Types.PackageSpec, String}, obj::LibGit2.GitRepo)
@ LibGit2 C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\LibGit2\src\types.jl:1153
[13] handle_repo_add!(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec)
@ Pkg.Types C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\Types.jl:702
[14] up_load_versions!(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec, entry::Pkg.Types.PackageEntry, level::Pkg.Types.UpgradeLevel)
@ Pkg.Operations C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:1319
[15] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel; skip_writing_project::Bool)
@ Pkg.Operations C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\Operations.jl:1355
[16] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, skip_writing_project::Bool, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
@ Pkg.API C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\API.jl:341
[17] up(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Pkg.Types.PackageMode, Tuple{Symbol}, NamedTuple{(:mode,), Tuple{Pkg.Types.PackageMode}}})
@ Pkg.API C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\API.jl:156
[18] up(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::Pkg.Types.PackageMode, subdir::Nothing, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\API.jl:171
[19] up()
@ Pkg.API C:\Users\pkonl\SublimeJulia_1.8\assets\julia-1.8.0\share\julia\stdlib\v1.8\Pkg\src\API.jl:162
[20] top-level scope
@ REPL[2]:1
My .gitconfig
:
[credential "helperselector"]
selected = <no helper>
This is created by the “helper selector”, apparently installed with Git.
Reverted the thread subject: the problem is not limited to v1.8.
Would the environment variable JULIA_PKG_USE_CLI_GIT
solve this? Then you can just use the git command that comes with Git for Windows?
ENV["JULIA_PKG_USE_CLI_GIT"]=true
Yes, thank you. The code failure is now forestalled. Alas, no credential helper is available still.
I have to type in the username/password for all private repos.
Also, the julia prompt becomes messed up.