{"record":{"id":"ebceae99a3d8cb73","repo":"ipfs/kubo","slug":"remote-pinning-service-name-not-specified","errorCode":null,"errorMessage":"remote pinning service name not specified","messagePattern":"remote pinning service name not specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/commands/pin/remotepin.go","lineNumber":756,"sourceCode":"func getRemotePinServiceFromRequest(req *cmds.Request, env cmds.Environment) (*pinclient.Client, error) {\n\tservice, serviceFound := req.Options[pinServiceNameOptionName]\n\tif !serviceFound {\n\t\treturn nil, fmt.Errorf(\"a service name must be passed\")\n\t}\n\n\tserviceStr := service.(string)\n\tvar err error\n\tc, err := getRemotePinService(env, serviceStr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn c, nil\n}\n\nfunc getRemotePinService(env cmds.Environment, name string) (*pinclient.Client, error) {\n\tif name == \"\" {\n\t\treturn nil, fmt.Errorf(\"remote pinning service name not specified\")\n\t}\n\tendpoint, key, err := getRemotePinServiceInfo(env, name)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn pinclient.NewClient(endpoint, key), nil\n}\n\nfunc getRemotePinServiceInfo(env cmds.Environment, name string) (endpoint, key string, err error) {\n\tcfgRoot, err := cmdenv.GetConfigRoot(env)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\trepo, err := fsrepo.Open(cfgRoot)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}\n\tdefer repo.Close()","sourceCodeStart":738,"sourceCodeEnd":774,"githubUrl":"https://github.com/ipfs/kubo/blob/329838acdfafae224582930457efe80aa217afc0/core/commands/pin/remotepin.go#L738-L774","documentation":"`getRemotePinService` is the lower-level resolver that maps a service name to a configured `pinclient.Client`. An empty name string cannot address any config entry, so it short-circuits with this error before any config lookup. It is typically reached when `--service=` is passed with an empty value.","triggerScenarios":"Passing `--service=\"\"` (empty value) to a `pin remote` subcommand; a script variable that interpolates to empty, e.g. `--service=\"$SVC\"` where `$SVC` is unset; calling the command API with name \"\".","commonSituations":"Environment variable for the service name is unset in CI scripts; template expansion produced `--service=`; shell word-splitting dropped the value after `=`.","solutions":["Provide a non-empty service name: `ipfs pin remote ls --service=web3.storage`.","In scripts, fail early if the variable is empty: `[ -n \"$SVC\" ] || { echo 'service name required'; exit 1; }`.","Check that the shell isn't eating the value (unquoted variables, `set -u` differences) and quote `\"$SVC\"`.","List configured names with `ipfs pin remote ls`-style service listing and pick the correct one."],"exampleFix":"// before (shell)\nipfs pin remote ls --service=\"$SVC\"   # SVC unset -> --service=\n// after\n: \"${SVC:?service name is required}\"\nipfs pin remote ls --service=\"$SVC\"","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nif [ -z \"${SERVICE:-}\" ]; then\n  echo \"service name must be non-empty\" >&2\n  exit 2\nfi\nipfs pin remote ls --service=\"${SERVICE}\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Quote variables so empty values are visible","Use ${VAR:?msg} to fail fast on unset variables","Verify interpolated values with set -x during debugging"],"tags":["cli","remote-pinning","empty-argument","validation"],"backgroundTag":"missing-required-option","analyzedSha":"329838acdfafae224582930457efe80aa217afc0","analyzedAt":"2026-09-03T18:30:52.135Z","contentChangedAt":"2026-09-03T18:30:52.135Z","schemaVersion":2},"datasetVersion":"2026-09-11T00:17:11.886Z"}