{"record":{"id":"3344211e8d31441b","repo":"asdf-vm/asdf","slug":"short-name-plugin-repository-is-disabled","errorCode":null,"errorMessage":"Short-name plugin repository is disabled","messagePattern":"Short-name plugin repository is disabled","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/plugins/plugins.go","lineNumber":383,"sourceCode":"\t}\n\n\texists, err := PluginExists(config.DataDir, pluginName)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"unable to check if plugin already exists: %w\", err)\n\t}\n\n\tif exists {\n\t\treturn NewPluginAlreadyExists(pluginName)\n\t}\n\n\tplugin := New(config, pluginName)\n\n\tif pluginURL == \"\" {\n\t\t// Ignore error here as the default value is fine\n\t\tdisablePluginIndex, _ := config.DisablePluginShortNameRepository()\n\n\t\tif disablePluginIndex {\n\t\t\treturn fmt.Errorf(\"Short-name plugin repository is disabled\")\n\t\t}\n\n\t\tlastCheckDuration := 0\n\t\t// We don't care about errors here as we can use the default value\n\t\tcheckDuration, _ := config.PluginRepositoryLastCheckDuration()\n\n\t\tif !checkDuration.Never {\n\t\t\tlastCheckDuration = checkDuration.Every\n\t\t}\n\n\t\tindex := pluginindex.Build(config.DataDir, config.PluginIndexURL, false, lastCheckDuration)\n\t\tvar err error\n\t\tpluginURL, err = index.GetPluginSourceURL(pluginName)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error fetching plugin URL: %s\", err)\n\t\t}\n\t}\n","sourceCodeStart":365,"sourceCodeEnd":401,"githubUrl":"https://github.com/asdf-vm/asdf/blob/074a1722ca88d6677f228541ce06efaf4f9924d4/internal/plugins/plugins.go#L365-L401","documentation":"asdf's plugin Add supports adding plugins by short name, resolved via a remote plugin index (plugin repository). When the short-name repository is explicitly disabled in asdf config (DisablePluginShortNameRepository), Add cannot resolve a short name to a git URL, so it refuses with this error. It is a guard so users get a clear message instead of a confusing index lookup failure.","triggerScenarios":"Calling plugins.Add (or `asdf plugin add <name>` in the CLI) with an empty pluginURL while the config option disable_plugin_short_name_repository / ASDF_DISABLE_PLUGIN_SHORT_NAME_REPOSITORY is enabled.","commonSituations":"Users on locked-down/air-gapped machines or corporate setups who disabled the plugin index but still try `asdf plugin add nodejs` with a short name instead of a full git URL.","solutions":["Pass the full plugin repository URL explicitly: `asdf plugin add <name> <git-url>`, which bypasses the short-name index path","Disable the short-name repository restriction by removing disable_plugin_short_name_repository = true from ~/.asdfrc or unsetting ASDF_DISABLE_PLUGIN_SHORT_NAME_REPOSITORY","Check the resolved config (asdf config) to confirm which setting disabled the repository"],"exampleFix":"// before\nplugins.Add(conf, \"nodejs\", \"\", \"\", os.Stdout) // short name, index disabled\n// after\nplugins.Add(conf, \"nodejs\", \"https://github.com/asdf-vm/asdf-nodejs.git\", \"\", os.Stdout)","handlingStrategy":"validation","validationCode":"disabled, _ := config.DisablePluginShortNameRepository()\nif disabled && pluginURL == \"\" {\n    return fmt.Errorf(\"short-name repo disabled; pass an explicit plugin URL\")\n}\nerr := plugins.Add(conf, name, pluginURL, ref, os.Stdout)","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"Short-name plugin repository is disabled\") {\n    // fall back to explicit URL\n}","preventionTips":["Always pass an explicit git URL when the index may be disabled","Read ASDF_DISABLE_PLUGIN_SHORT_NAME_REPOSITORY / asdfrc before scripting short-name adds"],"tags":["config","plugin-index","asdf"],"backgroundTag":"plugin-repository-disabled","analyzedSha":"074a1722ca88d6677f228541ce06efaf4f9924d4","analyzedAt":"2026-08-30T19:56:42.972Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}