meta { name: Create Repository type: http seq: 7 } post { url: {{baseUrl}}/api/git_repositories body: json auth: none } headers { Accept: application/json Content-Type: application/json Cookie: {{sessionCookie}} } body:json { { "name": "My Project Repository", "provider": "github", "owner": "username", "repo": "repository-name", "branch": "main", "project": "/api/projects/1", "personalAccessToken": "ghp_xxxxxxxxxxxx" } } docs { # Create Repository Creates a new Git repository entry. ## Body Parameters - `name`: Display name for the repository - `provider`: One of 'github', 'gitea', 'local' - `owner`: Repository owner/organization - `repo`: Repository name - `branch`: Default branch (usually 'main' or 'master') - `project`: IRI reference to project (e.g., "/api/projects/1") - `personalAccessToken`: Optional access token for private repos ## Provider-Specific Settings ### GitHub - `owner`: GitHub username or organization - `repo`: Repository name - `personalAccessToken`: GitHub Personal Access Token (optional for public repos) ### Gitea - `owner`: Gitea username or organization - `repo`: Repository name - `personalAccessToken`: Gitea API token - Requires `giteaUrl` in environment ### Local - `localPath`: Absolute path to local Git repository - No owner/repo needed ## Security - Requires authentication - Token is stored encrypted in database }