Register a repository
add_repoRegister a GitLab project so its files can be read without checkout, using an existing local clone or a server-side mirror; validates local paths and does not clone or fetch.
Instructions
Register a project with this server. With local_path, reads use that existing clone instead of a server-side mirror; the path is checked to be a git repository here, so a wrong path is refused now rather than at read time. Without it, the project is registered as mirror-backed, which also makes it appear in list_repos before it has ever been read. Nothing is cloned or fetched: use sync_repo for that, or simply read the project. A project already registered is updated; its freshness policy is kept.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | GitLab project path, e.g. 'group/subgroup/repo'. Defaults to GITLAB_DEFAULT_PROJECT. | |
| local_path | No | Path to an existing clone (or bare repository) to read from instead of a mirror. |