Skip to main content
The SDK automatically creates secure Git URLs with embedded JWT authentication.

Options

permissions
string
Array of permissions. Defaults to ["git:read", "git:write"].
ttl
string
Token TTL. Token TTL in seconds. Defaults to 1 year.
refPolicies
object[]
Ordered per-ref policy rules. Each entry is { pattern, ops? }, and the first pattern that matches the target ref wins. An entry with no ops is an explicit allow. Patterns without a refs/ prefix are normalized as branch names (main becomes refs/heads/main). The Python SDK names this option ref_policies. The Go SDK names it RefPolicies with type storage.RefPolicyList. Available operations:See the Branch Protection guide for full details.

Available Permissions

Ephemeral Remote URL

Use getEphemeralRemoteURL() (TypeScript), get_ephemeral_remote_url() (Python), or EphemeralRemoteURL() (Go) to generate URLs that point to the ephemeral namespace. This is useful for temporary branches that shouldn’t sync to upstream mirrors. See the Ephemeral Branches guide for more details.

Import Remote URL

Use getImportRemoteURL() (TypeScript), get_import_remote_url() (Python), or ImportRemoteURL() (Go) to generate URLs that point to the +import push namespace. Pushing to this URL triggers immediate cold-storage archival after pack distribution. See the Imports guide and getImportRemoteURL() reference for details.

Response

Returns a string containing the HTTPS Git remote URL with embedded JWT authentication:
For ephemeral URLs:
For import URLs: