Skip to main content
Create a repository in the organization encoded in the client’s private key. Required scope: write
Create with an upstream Git remote:

Options

str | None
Repository name. If omitted, the API generates a name.
str | None
Default bookmark name. Defaults to main when omitted.
UpstreamConfig | None
Optional upstream Git remote to attach at create time. On create, auth=UNSET and auth=None both create a public upstream. Pass TokenAuth or UsernamePasswordAuth to store credentials.

Response

str
Repository ID.
str
Organization slug.
str
Repository name.
str
Default bookmark name.
str
Current change ID at the default bookmark tip.
UpstreamConfig | None
Configured upstream remote, or null when no upstream is configured.
datetime
Creation time.
dict[str, str]
Repository tags.

UpstreamConfig

str
Upstream Git remote URL.
'token' | 'username_password' | None
Stored upstream authentication kind, or null when the upstream is public.