Git Repository Configuration
https://app.example.comis an example address. Replace it with the actual address of your environment, retaining the route path and query parameters.
1. Configuration Goal
Create Git Repository Connections in the Admin Console to provide reusable Git sources for Skills, Works, and Connectors in Resource Hub.
The Git Repositories page maintains only repository connections, default branches, authentication methods, credentials, and Access Scope. It does not maintain resource drafts, resource versions, file merges, or Explore publication strategies.
2. Configuration Entry
Configuration entry: System → Git repositories
app.example.comis an example domain. During actual operation, replace it with the AOS Work access domain for the customer environment. Keep the route path/admin/settings/git-repositoriesunchanged.
The page provides the following operations and information:
Add repository: Add a repository connection;Search Git repositories: Search repository connections;- List fields:
Name,Repository URL,Default branch,Auth, andAccess scope; - More actions on the right of each record: continue to use the edit, test, unbind, or delete actions provided by the current environment.
3. Pre-configuration Checklist
Before starting, confirm:
- The current administrator has Admin Console access and Git repository management permission;
- The repository name, repository URL, and readable default branch are confirmed;
- The repository serves exactly one resource type:
Skill,Work, orConnector; - Credentials matching the repository's authentication method are ready. For a publicly readable repository, use the no-auth option provided by the page;
- The target repository branch contains the corresponding
.workbenchManifest and resource directory structure; - SSH private keys, Tokens, and other authentication secrets are not recorded in ordinary documents, chat records, or resource files.
4. Repository Connection Fields
After clicking Add repository, the page opens the Add repository dialog:
| Field | Required indicator | Instructions |
|---|---|---|
Repository name | Required (*) | Name used to identify the repository connection. Use a name that indicates its purpose and resource type. |
Default branch | Required (*) | Branch read by default. The branch must exist and be readable with the current credentials. main in the interface is only an example. Resource Hub uses this branch when no branch is explicitly specified; it falls back to the remote HEAD only when no default branch is configured. |
Repository URL | Required (*) | Target Git repository address. Enter a repository URL accessible from the current environment. |
Auth type | Required (*) | Repository authentication method. No auth in the interface is only an example; private repositories should use the authentication method matching their credentials. |
Access scope | Required (*) | Resource type served by this connection: Skill, Work, or Connector. A repository connection can have only one access scope at a time. |
Credential secret | Not marked required in the interface | Enter an SSH private key, Token, or other credential according to the selected authentication method. The plaintext credential is not shown after saving. |
Test connection verifies whether the repository URL, branch, authentication method, and credentials can be accessed. Save repository saves the connection configuration. Do not put credentials in Repository name, URL parameters, or resource files.
5. Add a Git Repository Connection
- Open System → Git repositories.
- Click
Add repository. - Fill in
Repository name. - Fill in
Default branchand confirm that the branch exists remotely. - Fill in
Repository URL. - Select
Auth type. - Select an
Access scopematching the target resource type:Skill,Work, orConnector. - Enter
Credential secretaccording to the authentication method. Handle a public repository without authentication as required by the page. - Click
Test connectionand confirm that the test succeeds. - Click
Save repository.
A successful connection test only means that the Git repository and credentials are accessible. It does not replace subsequent Resource Manifest and resource-directory structure checks.
6. Access Scope and Resource Types
Access scope defines the binding boundary between a repository connection and the Resource Hub resource type:
| Access Scope | Resource types available in Resource Hub | Manifest in the target repository | Resource path format |
|---|---|---|---|
Skill | Skill | .workbench/skills.json | skills/<key> |
Work | Work | .workbench/works.json | works/<key> |
Connector | Connector | .workbench/connectors.json | connectors/<key> |
Resource Hub displays only repository connections whose scope exactly matches the selected Resource Type and whose connection test succeeded. A repository with Skill scope cannot create a Work, and a repository with Connector scope cannot create a Skill.
7. Resource Manifest and Directory Structure
7.1 General Manifest Requirements
The target branch must contain the Manifest corresponding to the Access scope. The Manifest must satisfy all of the following:
- The file exists and contains valid JSON;
- The corresponding
skills,works, orconnectorsfield in the JSON is an array; - Every array item is an object containing non-empty string values for
key,name, andpath; keyvalues within one Manifest must not be duplicated case-insensitively; for example,GitHubandgithubare duplicates;pathmust exactly equal the resource root directory pluskey:skills/<key>,works/<key>, orconnectors/<key>;- Paths use
/as the separator, must not be absolute, and must not contain a path segment whose value is..; pathmust point to a directory in the target commit.
Example structure:
.workbench/
skills.json
skills/
code-review/
SKILL.md7.2 Skill
The Skill Manifest item path must be skills/<key>, and the root of the corresponding resource directory must contain SKILL.md.
skills/
<key>/
SKILL.mdWhen a version is later published in Resource Hub, the root SKILL.md must be a non-empty text file with parseable YAML frontmatter. The Skill description may be empty, but the frontmatter must not be missing or damaged.
7.3 Work
The Work Manifest item path must be works/<key>. The resource root must not contain SKILL.md and must contain at least one first-level member definition:
works/
<key>/
<member>/
SKILL.mdOnly a file whose relative path is exactly <member>/SKILL.md counts as a first-level member. group/<member>/SKILL.md does not count. At publication time, every member definition must contain parseable YAML frontmatter and a non-empty description. After trimming leading and trailing whitespace, a member name must be non-empty and no longer than 100 characters; it cannot be . or .., contain / or a backslash, or contain ASCII control characters. Member names must be exactly unique within a Work.
7.4 Connector
The Connector Manifest item path must be connectors/<key>. The resource root must not contain SKILL.md and must contain at least one first-level member definition:
connectors/
<key>/
<member>/
SKILL.mdThe root-level README.md, ordinary files, and references/ inside member directories may exist. If a root-level SKILL.md and member-level Skills both exist, Connector structure validation fails. At publication time, every member definition must contain parseable YAML frontmatter and a non-empty description. Member names follow the same safety rules as Work member names and must be exactly unique within a Connector.
8. Create and Sync Resources from Git
After the Git repository connection is complete, use it in Resource Hub as follows:
- Click
New Resourceand first select aResource Type:Skill,Work, orConnector. - Select
Import from Git. - Select a Git Repository Connection whose type matches the resource type and whose connection test succeeded.
- The system reads the default branch and displays the repository, Commit, and file preview.
- Fill in
Resource Name,Description, andDraft Name. - Confirm to create the resource and its first Named Draft.
When Git Sync is later executed in Resource Hub, the system reads the latest available Commit on the default branch and always creates a new Named Draft. It does not overwrite existing drafts or published Immutable Versions. The Git Repositories page does not handle file merges or conflicts.
9. Git Resource Snapshot Validation
After the resource-list preview passes, the first import or confirmed resource snapshot read performs these additional checks:
- During the first import, the Commit actually read must match the Commit confirmed during preview. If the remote commit changes, preview again;
- The resource
keyand normalizedpathmust still match the current Manifest item.keymatching is case-sensitive; - A resource whose Manifest item was deleted or renamed is not silently imported from its old path;
- The resource contains at least one file;
- The file count does not exceed 1000;
- No individual file exceeds 100 MiB;
- The total size of all files in one resource does not exceed 500 MiB;
- Files no larger than 1,000,000 bytes that are valid UTF-8 and contain no NUL byte can be read as text; other files are preserved as binary content.
10. Common Validation Problems
| Symptom | Resolution |
|---|---|
| Connection test fails | Check the URL, default branch, authentication method, credentials, and network access permission; confirm that the target branch exists. |
| Corresponding Manifest not found | Confirm that .workbench/<type>.json is committed to the branch actually being read and that type matches Access scope. |
| Invalid Manifest structure | Check JSON syntax, array fields, non-empty key/name/path, duplicate key values, and exact path matching. |
| Resource directory not found | Check that path is the corresponding resource root plus key, and confirm that the target path is a directory. |
| Skill validation fails | Confirm that skills/<key>/SKILL.md exists. |
| Work or Connector validation fails | Confirm that the root has no SKILL.md and contains at least one first-level <member>/SKILL.md. |
| Commit changes during import | Run the resource preview again, then perform the first import with the new Commit. |
| Snapshot exceeds size limits | Reduce the number of resource files, split oversized files, or split the resource before committing again. |
A successful Git fetch does not mean that Resource validation succeeds. A repository may be accessible while still being invalid as a Resource Hub source because its Manifest, paths, or resource directory does not meet the requirements.
11. Permissions and Auditing
When Access Scope is added or changed, credentials are replaced, a connection is tested again, a resource binding is removed, or a repository connection is deleted, the system records the operator, time, changes, and result. Resource modules can use repository connections but cannot read Git credentials in plaintext. Credentials continue to be displayed as masked values or status.
12. Post-save Verification
- Return to the Git repositories list and search for the saved
Repository name. - Verify
Repository URL,Default branch,Auth, andAccess scope. - Confirm that credentials are displayed only as masked values or status, never in plaintext.
- In Resource Hub, create a resource of the corresponding type and confirm that the resource selector displays only connections with matching
Access scopeand a successful connection test. - Run one
Import from Gitpreview using the target branch and confirm that the Commit, Manifest, and resource list can all be read. - If the repository is referenced by a resource, check the reference count before changing
Access scopeor deleting it. Do not perform an operation that would create an invalid binding while a valid binding exists.
13. Completion Criteria
- The Git Repository Connection is saved and the list shows the correct name, URL, default branch, authentication status, and access scope;
Test connectionsucceeded;Access scopeis one ofSkill,Work, orConnectorand matches the subsequent Resource Type;- The target branch contains a valid Manifest and resource directory meeting the type-specific requirements;
- Resource Hub can complete a resource preview or first import through the connection;
- The first-import Commit matches the preview Commit, and file count and size are within limits;
- Credentials are stored securely and displayed in masked form, and have not been written to ordinary documents or resource content;
- Published resource versions are not modified in place by later Git synchronization.