The gcs backend (backend-gcs) targets Google Cloud Storage JSON API v1 with three authentication modes — Service Account JSON (RS256 JWT), Desktop OAuth 2.0 PKCE, or anonymous public bucket access — plus custom endpoint routing for emulators like fake-gcs-server.
Setup Recipes#
rship auth gcs gcs-prod \
--bucket my-archive \
--prefix 2026/ \
--storage-class NEARLINE \
--service-account-file ./gcp-sa.json
rship ls gcs-prod:Flags Reference (rship auth gcs)#
| Flag | Default | Description |
|---|---|---|
<REMOTE> | — | Logical remote name (e.g. gcs, gcp-archive) |
--bucket | Optional | Default bucket; omit to address buckets via remote:bucket/path |
--prefix | Empty | Object prefix inside the bucket |
--project-number | None | Optional Google Cloud project number |
--storage-class | Bucket default | STANDARD, NEARLINE, COLDLINE, or ARCHIVE |
--service-account-file | None | Path to GCP Service Account JSON key |
--impersonate | None | Domain-Wide Delegation impersonated subject (sub) |
--client-id / --client-secret | None | Google OAuth 2.0 Desktop credentials for PKCE flow |
--scope | full | Alias full, read_write, read_only, cloud-platform, or scope URL |
--anonymous | false | Access public buckets without credentials |
--endpoint | GCS default | Custom root URL (derives /storage/v1 and /upload/storage/v1) |
Protocol Internals#
- Chunk alignment & crash resume: Files
<= 8 MiBuse single-shotuploadType=multipart; larger objects stream via256 KiB-aligned resumable upload sessions (16 MiBdefault chunk =64 × 256 KiB). - Strict RFC 3986 path encoding: Encodes
/,+,#,?,%, spaces, and multi-byte UTF-8 segments accurately for GCS JSON/b/{bucket}/o/{object}routes. - Checksums & server-side rewrite: Verifies native
MD5andCRC32Cobject hashes and uses GCSrewriteTofor instant intra-GCS copies.