Jguer/yay · error · ErrInvalidRepository
invalid repository
Error message
invalid repository
What it means
Sentinel error (ErrInvalidRepository) from the ABS download package, raised when mapping a package to an Arch Linux source repository URL and the resolved repository name does not correspond to any known repo. It is a guard over the repo-name-to-Gitlab-URL translation: the package's repository field failed to match a valid entry, so no download URL can be constructed.
Solutions
- Verify the repository name returned for the package (core, extra, multilib, etc.)
- Update yay: new or renamed repositories may be unknown to an outdated version
- File a bug if a legitimate official repository triggers this error
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/download/abs.go:22 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Jguer/yay@328f4b4939 (2026-09-07).
Data as JSON: /api/errors/05bfc2c8baf2c4ef.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/download/abs.go:22
"context"
"errors"
"fmt"
"io"
"net/http"
"regexp"
"github.com/leonelquinteros/gotext"
"github.com/Jguer/yay/v13/pkg/settings/exe"
)
const (
MaxConcurrentFetch = 20
absPackageURL = "https://gitlab.archlinux.org/archlinux/packaging/packages"
)
var (
ErrInvalidRepository = errors.New(gotext.Get("invalid repository"))
ErrABSPackageNotFound = errors.New(gotext.Get("package not found in repos"))
)
type regexReplace struct {
repl string
match *regexp.Regexp
}
// regex replacements for Gitlab URLs
// info: https://gitlab.archlinux.org/archlinux/devtools/-/blob/6ce666a1669235749c17d5c44d8a24dea4a135da/src/lib/api/gitlab.sh#L84
var gitlabRepl = []regexReplace{
{repl: `$1-$2`, match: regexp.MustCompile(`([a-zA-Z0-9]+)\+([a-zA-Z]+)`)},
{repl: `plus`, match: regexp.MustCompile(`\+`)},
{repl: `-`, match: regexp.MustCompile(`[^a-zA-Z0-9_\-.]`)},
{repl: `-`, match: regexp.MustCompile(`[_\-]{2,}`)},
{repl: `unix-tree`, match: regexp.MustCompile(`^tree$`)},
}
View on GitHub (pinned to 328f4b4939)