ipfs/kubo · error
cannot show or change pinning services credentials
Error message
cannot show or change pinning services credentials
What it means
'ipfs config' guard block: the requested key matches the Pinning.RemoteServices conceal selector (glob prefix), which hides remote pinning service API credentials. They are secrets and cannot be read or changed through the API to avoid leaking access tokens.
Source
Thrown at core/commands/config.go:100
cmds.BoolOption(configExpandAutoName, "Expand 'auto' placeholders to their expanded values from AutoConf service."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
args := req.Arguments
key := args[0]
var output *ConfigField
// This is a temporary fix until we move the private key out of the config file
switch strings.ToLower(key) {
case "identity", "identity.privkey":
return errors.New("cannot show or change private key through API")
default:
}
// Temporary fix until we move ApiKey secrets out of the config file
// (remote services are a map, so more advanced blocking is required)
if blocked := matchesGlobPrefix(key, config.PinningConcealSelector); blocked {
return errors.New("cannot show or change pinning services credentials")
}
cfgRoot, err := cmdenv.GetConfigRoot(env)
if err != nil {
return err
}
r, err := fsrepo.Open(cfgRoot)
if err != nil {
return err
}
defer r.Close()
if len(args) == 2 {
// Check if user is trying to write config with expand flag
if expandAuto, _ := req.Options[configExpandAutoName].(bool); expandAuto {
return fmt.Errorf("--expand-auto can only be used for reading config values, not for setting them")
}
value := args[1]View on GitHub (pinned to 329838acdf)
Solutions
- Manage pinning service credentials via 'ipfs pin remote service' commands
- Edit the Pinning.RemoteServices section directly in the config file on the host
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/commands/config.go:100 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ipfs/kubo@329838acdf (2026-09-03).
Data as JSON: /api/errors/5e9b6ee19372118d.
Report an issue: GitHub.