git-drs

Adding Provider Objects with git drs add-url

git drs add-url prepares a Git pointer plus local DRS metadata for an object that already exists in provider storage.

Important behavior:

Supported URL Forms

Primary support today is S3-style URLs:

The remote-backed inspect path is intentionally narrow in v1: S3 and S3-compatible buckets only.

Two Add-URL Input Modes

1) Configured bucket object key (preferred)

If your remote org/project already has a bucket mapping, pass an object key relative to that configured bucket scope and set --scheme.

git drs track "data/*.bin"
git add .gitattributes

git drs add-url path/to/object.bin data/from-bucket.bin \
  --scheme s3 \
  --sha256 <64-char-sha256>

Notes:

2) Raw provider URL

You can still pass a full provider URL directly.

git drs add-url s3://my-bucket/path/to/object.bin data/from-bucket.bin \
  --sha256 <64-char-sha256>

If you know the authoritative SHA256, pass --sha256.

git drs track "data/*.bin"
git add .gitattributes

git drs add-url path/to/object.bin data/from-bucket.bin \
  --scheme s3 \
  --sha256 <64-char-sha256>

git add data/from-bucket.bin
git commit -m "add known-sha object"
git drs push

Unknown SHA256

If SHA256 is unknown, omit --sha256.

Behavior:

  1. add-url performs object metadata lookup (HEAD/attributes).
  2. A deterministic placeholder/local OID is derived from remote object metadata.
  3. A pointer file and local DRS metadata are written; the placeholder is not recorded as a content checksum.
  4. The provider URL/source metadata remains the retrieval identity until content is downloaded.
  5. git drs push performs metadata registration.
git drs track "data/*.bin"
git add .gitattributes

git drs add-url path/to/object.bin data/from-bucket.bin --scheme s3

git add data/from-bucket.bin
git commit -m "add unknown-sha object"
git drs push

Authentication and Endpoint Configuration

add-url no longer accepts per-command AWS flags.

For the normal remote-backed flow, git drs add-url does not use local AWS_* credentials. Syfon loads the bucket credential and endpoint configuration that were already stored through bucket management.

If your remote does not implement the internal inspect route yet, add-url fails with an upgrade message instead of falling back to local env-based inspection.

Prerequisites

Troubleshooting

blob attributes failed ... MovedPermanently (301)

Usually a stored bucket credential is pointed at the wrong region or endpoint for S3-compatible storage.

no local payload available; skipping upload and keeping metadata-only registration

Expected for add-url pointer/metadata-only flows where local payload bytes are intentionally absent.

file is not tracked

Track the path pattern and re-add:

git drs track "data/*.bin"
git add .gitattributes