dcloud git repositories create

Create a repository

IAM git:CreateRepositoryChanges state

Synopsis

dcloud git repositories create --name name [flags]

Flags

  • --nameRequired

    string

    Unique within the organization; part of the clone URL

    Constraints: 1-100 chars, /^[A-Za-z0-9][A-Za-z0-9._-]*$/

  • --descriptionOptional

    string

    One line about the repository; the template's description when absent

    Constraints: max 500 chars

  • --visibilityOptional

    enum

    Who can see it; private when absent. public also needs git:PublishRepository

    One of: private, internal, public

  • --default-branchOptional

    string

    The branch clones check out and pull requests target by default; main when absent

    Constraints: 1-100 chars

  • --tagsOptional

    map of string

    Tags for the new resource, e.g. {"env": "prod", "project": "shop"}. Keys your organization marks required must be present, or the create is refused with the missing keys (GET /tags/api/keys lists them).

    Constraints: key=value

  • --templateOptional

    object

    Start from a template: one commit with its files, no history (CI runs on it)

    Constraints: JSON

Example

dcloud git repositories create --name example

Generated from the API description, the same one the API checks requests against and the CLI is built from.