git_repository
The git_repository domain has 9 actions. On the meta surface they are all reached through arcane_git_repository; on the individual surface each one is its own tool; on the dynamic surface run them with arcane_execute_action and the canonical ID.
Summary
Section titled “Summary”| Action | Title | Kind |
|---|---|---|
git_repository.branches | List repository branches | read |
git_repository.browse_files | Browse repository files | read |
git_repository.create | Create a git repository | write |
git_repository.delete | Delete a git repository | destructive |
git_repository.get | Get a git repository | read |
git_repository.list | List git repositories | read |
git_repository.sync | Sync git repositories | destructive |
git_repository.test | Test a git repository | write |
git_repository.update | Update a git repository | write |
Actions
Section titled “Actions”git_repository.branches
Section titled “git_repository.branches”List repository branches
Get all branches from a git repository with default branch detection
- Kind: read
- Required parameters:
id - Meta tool:
arcane_git_repositorywith"action": "branches" - Individual tool:
arcane_git_repository_branches - Arcane route:
GET /api/customize/git-repositories/{id}/branches - Operation ID:
listGitRepositoryBranches - Usage: Lists the remote’s branches live (a remote ref listing, like git ls-remote, with the stored credentials, no clone) for the repository id from git_repository.list. branches[] holds name and isDefault, default branch first. Use a name as branch for git_repository.browse_files, git_repository.test or gitops.create. Fails with 400 when the remote is unreachable or the credentials are wrong.
- Related actions:
git_repository.list,git_repository.browse_files,gitops.create
git_repository.browse_files
Section titled “git_repository.browse_files”Browse repository files
Browse files and directories in a git repository
- Kind: read
- Required parameters:
id - Meta tool:
arcane_git_repositorywith"action": "browse_files" - Individual tool:
arcane_git_repository_browse_files - Arcane route:
GET /api/customize/git-repositories/{id}/files - Operation ID:
browseGitRepositoryFiles - Usage: Lists the files of one branch at a path. Pass branch (Arcane answers 400 without it), names come from git_repository.branches.
- Related actions:
git_repository.branches,gitops.create
git_repository.create
Section titled “git_repository.create”Create a git repository
Create a new git repository configuration
- Kind: write
- Required parameters:
authType,name,url - Meta tool:
arcane_git_repositorywith"action": "create" - Individual tool:
arcane_git_repository_create - Arcane route:
POST /api/customize/git-repositories - Operation ID:
createGitRepository - Usage: Registers a git repository. Requires name, url and authType (none, http or ssh). For http pass username and token. For ssh pass sshKey and optionally sshHostKeyVerification (strict, accept_new (default) or skip). Optional commitAuthorName/commitAuthorEmail (default Arcane <arcane@localhost>) and an armored OpenPGP signingKey (+ signingKeyPassphrase, validated on save) apply to commits Arcane pushes, and enabled defaults to true. Nothing is contacted on save, so run git_repository.test next. Names are not unique. The result’s id feeds gitops.create (repositoryId). A remote environment receives the repository with the manager’s next environment health-check push, or at once with environment.sync.
- Related actions:
git_repository.test,git_repository.branches,gitops.create,environment.sync
git_repository.delete
Section titled “git_repository.delete”Delete a git repository
Delete a git repository configuration by ID
- Kind: destructive — requires
confirm: true - Required parameters:
id - Meta tool:
arcane_git_repositorywith"action": "delete" - Individual tool:
arcane_git_repository_delete - Arcane route:
DELETE /api/customize/git-repositories/{id} - Operation ID:
deleteGitRepository - Usage: Deletes a repository configuration by id (from git_repository.list). Arcane refuses while a GitOps sync stored on this instance still references it (find them with gitops.list on environment 0 with repositoryId=<id> and remove them with gitops.delete). That refusal is a 409 whose only message is the generic ‘Failed to delete git repository’ (an unknown id gives 404 with the same message). Syncs of remote environments live on the agent and are not checked: the next push to the agent (environment.sync or the health check) removes the repository there anyway.
- Related actions:
git_repository.list,gitops.list,gitops.delete,environment.sync
git_repository.get
Section titled “git_repository.get”Get a git repository
Get a git repository by ID
- Kind: read
- Required parameters:
id - Meta tool:
arcane_git_repositorywith"action": "get" - Individual tool:
arcane_git_repository_get - Arcane route:
GET /api/customize/git-repositories/{id} - Operation ID:
getGitRepository - Usage: Reads one repository configuration by id (from git_repository.list or git_repository.create): name, url, authType, username, sshHostKeyVerification, commit author, enabled and hasToken/hasSshKey/hasSigningKey flags. The stored token, SSH key and signing key are never returned. An unknown id fails with 404.
- Related actions:
git_repository.list,git_repository.update,git_repository.test
git_repository.list
Section titled “git_repository.list”List git repositories
Get a paginated list of git repositories
- Kind: read
- Required parameters: none
- Meta tool:
arcane_git_repositorywith"action": "list" - Individual tool:
arcane_git_repository_list - Arcane route:
GET /api/customize/git-repositories - Operation ID:
listGitRepositories - Usage: Lists the git repository configurations (credentials Arcane uses for GitOps syncs and git build contexts), 20 per page by default. search matches name, URL and description, page with start/limit. Each item gives the id the other git_repository and gitops actions take, plus authType and hasToken/hasSshKey flags. Secrets are never returned.
- Related actions:
git_repository.get,git_repository.create,gitops.list
git_repository.sync
Section titled “git_repository.sync”Sync git repositories
Sync git repositories from a manager to this agent instance
- Kind: destructive — requires
confirm: true - Required parameters:
repositories - Meta tool:
arcane_git_repositorywith"action": "sync" - Individual tool:
arcane_git_repository_sync - Arcane route:
POST /api/git-repositories/sync - Operation ID:
syncGitRepositories - Usage: Manager-to-agent push: replaces the whole repository set of the instance it runs on with the given list, deleting every repository not listed (with no check for GitOps syncs using it). Listed repositories that already exist are overwritten field by field, so an omitted token, sshKey or signingKey clears the stored one. To push a manager’s repositories to an agent use environment.sync instead.
- Related actions:
environment.sync,git_repository.list
git_repository.test
Section titled “git_repository.test”Test a git repository
Test connectivity and authentication to a git repository
- Kind: write
- Required parameters:
id - Meta tool:
arcane_git_repositorywith"action": "test" - Individual tool:
arcane_git_repository_test - Arcane route:
POST /api/customize/git-repositories/{id}/test - Operation ID:
testGitRepository - Usage: Checks that Arcane can reach and authenticate to the repository (optionally a branch) with the stored credentials. It does a shallow clone of branch (the remote default when omitted) and discards it. Success returns ‘Connection successful’, failure a 400 carrying the git error (e.g. authentication required). Each run records a success or error event (event.list). id from git_repository.list.
- Related actions:
git_repository.branches,git_repository.update,event.list
git_repository.update
Section titled “git_repository.update”Update a git repository
Update an existing git repository configuration
- Kind: write
- Required parameters:
id - Meta tool:
arcane_git_repositorywith"action": "update" - Individual tool:
arcane_git_repository_update - Arcane route:
PUT /api/customize/git-repositories/{id} - Operation ID:
updateGitRepository - Usage: Partial update of a repository configuration by id (from git_repository.list): only the fields sent change. Sending token, sshKey or signingKey as an empty string clears it. Changing url while a token or SSH key is stored is rejected unless that credential is sent again. Returns the updated repository. Re-run git_repository.test after changing credentials.
- Related actions:
git_repository.get,git_repository.test,git_repository.list