Skip to main content
Returns a JWT-authenticated remote URL targeting the +import push namespace. Pushing to this URL triggers immediate cold-storage archival after pack distribution—useful for bulk ingestion where you don’t need the repository to stay on hot disk.
// Default: read/write access, 1-year TTL
const importUrl = await repo.getImportRemoteURL();
// Returns: https://t:JWT@your-name.code.storage/repo-id+import.git

// Short-lived URL for a single push
const ciImportUrl = await repo.getImportRemoteURL({
  permissions: ['git:read', 'git:write'],
  ttl: 3600,
});

Options

permissions
string[]
Array of permissions. Defaults to ["git:read", "git:write"].
ttl
number
Token TTL in seconds. Defaults to 1 year.

Response

Returns a string containing the HTTPS Git remote URL with embedded JWT authentication:
https://t:{jwt}@{org}.code.storage/{repo-id}+import.git

Usage

Use the URL as a standard Git remote. Pushing to it enqueues cold-storage archival immediately after the pack distributes to all nodes:
git remote add import <url>
git push import main
git push import --tags
See the Imports guide for bulk ingestion workflows and cold-storage behavior.