{"record":{"id":"b6c3fa1cd34168f8","repo":"dutchcoders/transfer.sh","slug":"storj-access-not-set","errorCode":null,"errorMessage":"storj-access not set.","messagePattern":"storj-access not set\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cmd.go","lineNumber":514,"sourceCode":"\t\t\t\toptions = append(options, server.UseStorage(store))\n\t\t\t}\n\t\tcase \"gdrive\":\n\t\t\tchunkSize := c.Int(\"gdrive-chunk-size\") * 1024 * 1024\n\n\t\t\tif clientJSONFilepath := c.String(\"gdrive-client-json-filepath\"); clientJSONFilepath == \"\" {\n\t\t\t\treturn errors.New(\"gdrive-client-json-filepath not set.\")\n\t\t\t} else if localConfigPath := c.String(\"gdrive-local-config-path\"); localConfigPath == \"\" {\n\t\t\t\treturn errors.New(\"gdrive-local-config-path not set.\")\n\t\t\t} else if basedir := c.String(\"basedir\"); basedir == \"\" {\n\t\t\t\treturn errors.New(\"basedir not set.\")\n\t\t\t} else if store, err := storage.NewGDriveStorage(c.Context, clientJSONFilepath, localConfigPath, basedir, chunkSize, logger); err != nil {\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\toptions = append(options, server.UseStorage(store))\n\t\t\t}\n\t\tcase \"storj\":\n\t\t\tif access := c.String(\"storj-access\"); access == \"\" {\n\t\t\t\treturn errors.New(\"storj-access not set.\")\n\t\t\t} else if bucket := c.String(\"storj-bucket\"); bucket == \"\" {\n\t\t\t\treturn errors.New(\"storj-bucket not set.\")\n\t\t\t} else if store, err := storage.NewStorjStorage(c.Context, access, bucket, purgeDays, logger); err != nil {\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\toptions = append(options, server.UseStorage(store))\n\t\t\t}\n\t\tcase \"local\":\n\t\t\tif v := c.String(\"basedir\"); v == \"\" {\n\t\t\t\treturn errors.New(\"basedir not set.\")\n\t\t\t} else if store, err := storage.NewLocalStorage(v, logger); err != nil {\n\t\t\t\treturn err\n\t\t\t} else {\n\t\t\t\toptions = append(options, server.UseStorage(store))\n\t\t\t}\n\t\tdefault:\n\t\t\treturn errors.New(\"Provider not set or invalid.\")\n\t\t}","sourceCodeStart":496,"sourceCodeEnd":532,"githubUrl":"https://github.com/dutchcoders/transfer.sh/blob/c37bfd95797fd6da8a6da53fc13d191994b3f687/cmd/cmd.go#L496-L532","documentation":"Thrown by the transfer.sh CLI when --provider storj is selected but --storj-access is empty. Storj storage authenticates via an access grant (serialized access credential), and this flag supplies it; without it NewStorjStorage has no credentials, so the CLI aborts startup validation before contacting the network.","triggerScenarios":"Running with --provider storj and no --storj-access — access grant never generated/pasted, env interpolation empty, or the grant stored in a secret that was not injected into the flags.","commonSituations":"Setting up Storj for the first time before creating an access grant in the Satellite UI; rotating grants where the new grant was not updated in the service config; container deployments where the access grant env var is missing from the pod spec.","solutions":["Generate an access grant in Storj (Satellite UI or uplink) and pass it with --storj-access <grant>","Also provide --storj-bucket, which is validated next and will fail with its own error","Check shell quoting/length limits — access grants are long strings that can be truncated or mangled in some config systems","Inject the grant from a secret manager into the process arguments rather than hardcoding it"],"exampleFix":"// before\ntransfer.sh --provider storj --storj-bucket uploads\n// after\ntransfer.sh --provider storj --storj-access \"$STORJ_ACCESS_GRANT\" --storj-bucket uploads","handlingStrategy":"validation","validationCode":": \"${STORJ_ACCESS:?storj access grant required}\"\nargs+=(--storj-access \"$STORJ_ACCESS\")","typeGuard":null,"tryCatchPattern":"if err := cmd.Root.Execute(); err != nil {\n  if strings.Contains(err.Error(), \"storj-access not set\") {\n    log.Fatalf(\"storj provider requires --storj-access\")\n  }\n  os.Exit(1)\n}","preventionTips":["Generate the access grant before deploying and store it in a secret manager","Beware of length/quoting issues when embedding the long grant string in configs","Set --storj-access and --storj-bucket together"],"tags":["cli","configuration","storj","credentials","startup-validation"],"backgroundTag":"missing-required-flag","analyzedSha":"c37bfd95797fd6da8a6da53fc13d191994b3f687","analyzedAt":"2026-09-05T10:21:07.548Z","contentChangedAt":"2026-09-05T10:21:07.548Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}