ipfs/kubo · error
remote pinning service name not specified
Error message
remote pinning service name not specified
What it means
`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.
Source
Thrown at core/commands/pin/remotepin.go:756
func getRemotePinServiceFromRequest(req *cmds.Request, env cmds.Environment) (*pinclient.Client, error) {
service, serviceFound := req.Options[pinServiceNameOptionName]
if !serviceFound {
return nil, fmt.Errorf("a service name must be passed")
}
serviceStr := service.(string)
var err error
c, err := getRemotePinService(env, serviceStr)
if err != nil {
return nil, err
}
return c, nil
}
func getRemotePinService(env cmds.Environment, name string) (*pinclient.Client, error) {
if name == "" {
return nil, fmt.Errorf("remote pinning service name not specified")
}
endpoint, key, err := getRemotePinServiceInfo(env, name)
if err != nil {
return nil, err
}
return pinclient.NewClient(endpoint, key), nil
}
func getRemotePinServiceInfo(env cmds.Environment, name string) (endpoint, key string, err error) {
cfgRoot, err := cmdenv.GetConfigRoot(env)
if err != nil {
return "", "", err
}
repo, err := fsrepo.Open(cfgRoot)
if err != nil {
return "", "", err
}
defer repo.Close()View on GitHub (pinned to 329838acdf)
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.
Example fix
// before (shell)
ipfs pin remote ls --service="$SVC" # SVC unset -> --service=
// after
: "${SVC:?service name is required}"
ipfs pin remote ls --service="$SVC" Defensive patterns
Strategy: validation
Validate before calling
#!/usr/bin/env bash
if [ -z "${SERVICE:-}" ]; then
echo "service name must be non-empty" >&2
exit 2
fi
ipfs pin remote ls --service="${SERVICE}" Prevention
- Quote variables so empty values are visible
- Use ${VAR:?msg} to fail fast on unset variables
- Verify interpolated values with set -x during debugging
When it happens
Trigger: 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 "".
Common situations: Environment variable for the service name is unset in CI scripts; template expansion produced `--service=`; shell word-splitting dropped the value after `=`.
Understand the failure class
Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.
Related errors
- invalid configuration profile: %s
- inline-limit %d exceeds maximum allowed size of %d bytes
- %s can't be used with UnixFS metadata like mode or modificat
- %s and %s options are not compatible
- %s option requires %s to be set
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/ebceae99a3d8cb73.
Report an issue: GitHub.