asdf-vm/asdf · error
plugin %s not found in repository
Error message
plugin %s not found in repository
What it means
readPlugin loads plugins/<name> (an ini file) inside the plugin index directory to find the plugin's repository URL. If ini.Load fails — the file does not exist or is not parseable — the (unwrapped) error 'plugin %s not found in repository' is returned. Note it discards the underlying ini error.
Source
Thrown at internal/pluginindex/pluginindex.go:159
}
func lastUpdated(dir string) (int64, error) {
info, err := os.Stat(filepath.Join(dir, repoUpdatedFilename))
if err != nil {
return 0, fmt.Errorf("unable to read last updated file: %w", err)
}
// info.Atime_ns now contains the last access time
updated := time.Now().UnixNano() - info.ModTime().UnixNano()
return updated, nil
}
func readPlugin(dir, name string) (string, error) {
filename := filepath.Join(dir, "plugins", name)
pluginInfo, err := ini.Load(filename)
if err != nil {
return "", fmt.Errorf("plugin %s not found in repository", name)
}
return pluginInfo.Section("").Key("repository").String(), nil
}
func getPlugins(dir string) (plugins []Plugin, err error) {
files, err := os.ReadDir(filepath.Join(dir, "plugins"))
if _, ok := err.(*fs.PathError); ok {
return plugins, nil
}
for _, file := range files {
if !file.IsDir() {
url, err := readPlugin(dir, file.Name())
if err != nil {
return plugins, err
}
View on GitHub (pinned to 074a1722ca)
Solutions
- Check spelling/casing of the plugin name against `asdf plugin list all`.
- Force an index refresh (delete the repository dir under ASDF_DATA_DIR and rerun) so newly published plugins appear.
- Add the plugin directly by git URL: asdf plugin add <name> <repo-url>.
- If it's your plugin, submit it to the asdf-plugins repository.
Example fix
// before: misspelled / stale index
asdf plugin add nodejs
# Error: plugin nodejs not found in repository (if stale)
// after: refresh index then add
rm -rf "${ASDF_DATA_DIR:-$HOME/.asdf}/repository"
asdf plugin add nodejs https://github.com/asdf-vm/asdf-nodejs.git Defensive patterns
Strategy: validation
Validate before calling
indexFile := filepath.Join(dataDir, "repository", "plugins", name)
if _, err := os.Stat(indexFile); err != nil {
// not in index; add via full git URL instead
return asdf.PluginAdd(conf, name, repoURL)
} Try / catch
url, err := idx.GetPluginSourceURL(name)
if err != nil {
if strings.Contains(err.Error(), "not found in repository") {
// fall back to explicit git URL
url = knownPluginURLs[name]
}
} Prevention
- Check `asdf plugin list all` before adding to confirm exact names.
- Refresh the index regularly so new plugins are visible.
- Use full git URLs for plugins not in the asdf-plugins repo.
- Watch for casing: plugin names in the index are exact-match.
When it happens
Trigger: Calling GetPluginSourceURL or getPlugins (fed by Refresh) for a plugin name when: the plugin is not listed in the asdf-plugins index; the name is misspelled or has wrong casing; the index is stale/out of date (plugin added upstream recently); the plugin file exists but is malformed ini.
Common situations: Typo in `asdf plugin add <name>`; third-party plugin never added to the asdf-plugins repo; an old cached index lacking newly published plugins; community plugins that must be added by git URL instead of short name.
Related errors
- unable to initialize index: %w
- unable to update plugin index: %w
- unable to create file plugin index touch file: %w
- unable to read last updated file: %w
- no such plugin: %s
AI-assisted analysis of asdf-vm/asdf@074a1722ca (2026-08-30).
Data as JSON: /api/errors/4c7ada92e0b9cef5.
Report an issue: GitHub.