Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`jh git-credential setup` writes `https://*.juliahub.com`, which Julia's LibGit2 cannot parse, breaking Pkg git fetches

Open Beginner friendly
#63 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go, julia
Domain
cli, tooling

Research direction

Start in git.go at gitCredentialSetup() and inspect how entries from juliaHubDomains and configServer are written. Reproduce the failure with LibGit2.ismatch and the wildcard configuration, then verify that the generated credential configuration no longer causes Julia Pkg git fetches to fail.

Written by the indexing model from the issue text.

Description

Not really a jh bug. The config jh writes is valid git; Julia just can't read it. I'm filing it here because the practical fix is easiest on this side.

What happens

jh git-credential setup (gitCredentialSetup() in git.go) writes a credential helper for each entry in juliaHubDomains, including a wildcard host:

[credential "https://*.juliahub.com"]
	helper = /home/<user>/.local/bin/jh git-credential

Git supports this: gitcredentials(7) allows "wildcards in the domain name … as with the http.<URL>.* options". Julia's LibGit2 stdlib does not. When Pkg fetches any git remote over https, LibGit2 walks every credential.<url>.helper in the config and runs each URL through LibGit2.ismatch, which throws on the * host:

ERROR: Unable to parse URL
  [1] error(s::String)
  [2] ismatch(url::SubString{String}, git_cred::LibGit2.GitCredential)   @ LibGit2/src/gitcredential.jl:65
  [3] credential_helpers(cfg::LibGit2.GitConfig, cred::LibGit2.GitCredential)
  ...
 [22] update(regs::Vector{Pkg.Registry.RegistrySpec}; ...)   @ Pkg/src/Registry/Registry.jl:425

The fetch that fails doesn't need to involve JuliaHub. Here it was a github.com git registry (DyadHVACRegistry) during Pkg.add, so any Pkg.add, Pkg.update or registry update over git breaks. In my case it stopped the Pluto server in the Pluto VS Code extension from starting at all.

Reproduction

With the wildcard entry in ~/.gitconfig (Julia 1.12.6; master has the same code):

using LibGit2
LibGit2.ismatch("https://juliahub.com",   LibGit2.GitCredential("https", "github.com", "x.git"))  # fine
LibGit2.ismatch("https://*.juliahub.com", LibGit2.GitCredential("https", "github.com", "x.git"))  # ERROR: Unable to parse URL

Commenting out just the *.juliahub.com section makes Pkg work again. The juliahub.com and internal.juliahub.com entries parse fine.

Suggestion

Since jh's users are mostly Julia users, one of:

  1. Write explicit hosts instead of the wildcard: juliahub.com plus the configured server (the code already appends configServer) and any known subdomains. This is the smallest change and works with every Julia version.
  2. Keep the wildcard behind an opt-in (e.g. --wildcard), and warn that Julia's Pkg can't read it.
  3. At minimum, document the conflict and the workarounds: remove the wildcard line, or set JULIA_PKG_USE_CLI_GIT=true so Pkg uses the git CLI, which understands the wildcard.

The underlying LibGit2 behaviour belongs upstream in JuliaLang/julia. There is no existing issue for it; a report is being prepared and I'll link it here. Fixing it there only helps new Julia releases, which is why (1) is still worth doing.

Seen with jh 0.3.0; the wildcard is still in git.go on main (v0.4.0).


🤖 Posted for @pankgeorg by an AI agent — harness: Claude Code 2.1.283 · model: claude-opus-5-5
Session: local Claude Code session d41c35d3-a593-490a-ada2-8549b2045452

Dominant language
Go
Stars
3
Forks
1
Avg merge
4d 5h
Merged PRs (30d)
3

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaComputing/jh

All issues in JuliaComputing/jh

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.