ipfs/kubo · error

expecting three arguments: service name, endpoint and key

Error message

expecting three arguments: service name, endpoint and key

What it means

'ipfs pin remote service add' requires exactly three positional arguments -- service name, endpoint URL and API key/secret. This guard fires when fewer than three were provided (the command's argument declarations expect all three).

Source

Thrown at core/commands/pin/remotepin.go:494

	Arguments: []cmds.Argument{
		cmds.StringArg(pinServiceNameArgName, true, false, "Service name."),
		cmds.StringArg(pinServiceEndpointArgName, true, false, "Service endpoint."),
		cmds.StringArg(pinServiceKeyArgName, true, false, "Service key."),
	},
	Type: nil,
	Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
		cfgRoot, err := cmdenv.GetConfigRoot(env)
		if err != nil {
			return err
		}
		repo, err := fsrepo.Open(cfgRoot)
		if err != nil {
			return err
		}
		defer repo.Close()

		if len(req.Arguments) < 3 {
			return fmt.Errorf("expecting three arguments: service name, endpoint and key")
		}

		name := req.Arguments[0]
		endpoint, err := normalizeEndpoint(req.Arguments[1])
		if err != nil {
			return err
		}
		key := req.Arguments[2]

		cfg, err := repo.Config()
		if err != nil {
			return err
		}
		if cfg.Pinning.RemoteServices != nil {
			if _, present := cfg.Pinning.RemoteServices[name]; present {
				return fmt.Errorf("service already present")
			}
		} else {

View on GitHub (pinned to 329838acdf)

Solutions

  1. Provide all three: 'ipfs pin remote service add <name> <endpoint> <key>'
  2. Get the endpoint and key from your pinning service's dashboard
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at core/commands/pin/remotepin.go:494 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/eeb7443b508796a1. Report an issue: GitHub.