Sync Identity
Sync a Docker Hub repository's short description, README overview, and categories from nova.config.json.
Summary
The sync-identity recipe compares the configured identity with the current Docker Hub repository, reports each value as changed or unchanged, and sends only the differences. All desired values are validated before Nova sends an update.
The recipe uses project.description.short for the short description, the repository-root README.md for the overview, and dockerHub.categories for up to three categories. A missing README.md leaves the current overview unchanged and emits README.md was not found. The Docker Hub overview will not be changed.
Why Use This Command?
- Keeps Docker Hub identity aligned with the project metadata and README stored in the repository.
- Validates category slugs against Docker Hub's live category list before changing the repository.
- Repeats identity changes independently of an image release.
Requirements
- Docker login — Run
docker loginfor Docker Hub before the recipe. - Existing repository — Push the first image so the Docker Hub repository exists.
- Repository write access — The stored Docker Hub login must have write permission.
- Docker Hub config — Set
dockerHub.namespace,dockerHub.repository, andproject.description.shortinnova.config.json. - Enabled recipe — Set
recipes["docker-hub"]["sync-identity"].enabledtotrue.
Login Lookup
Nova reads Docker's existing login without printing the username's secret. It opens config.json in the directory named by DOCKER_CONFIG, or ~/.docker/config.json when that environment variable is unset.
Credential sources are checked in this order:
credHelpers["index.docker.io"].credHelpers["https://index.docker.io/v1/"].credsStore.- The base64
authvalue underauths["https://index.docker.io/v1/"].
For a helper named <helper>, Nova runs docker-credential-<helper> get and sends https://index.docker.io/v1/ on standard input. If no source yields credentials, the command stops with No Docker Hub login found. Run "docker login".
Behavior
- Description — Uses
project.description.shortand rejects more than 100 characters. - Overview — Uses the repository-root
README.mdand rejects more than 25,000 characters. A missing file leaves the existing overview unchanged. - Categories — Maps each configured slug to the live Docker Hub category object. An empty array clears all categories; more than three or any unknown slug stops the recipe before updates.
- Unchanged fields — Reports the current value with
(unchanged)and sends no request for that field. - Dry run — Performs credential, repository, permission, and value checks while sending no changes.
Settings
{
"dockerHub": {
"namespace": "example",
"repository": "example-project",
"categories": ["developer-tools", "security"]
},
"recipes": {
"docker-hub": {
"sync-identity": {
"enabled": true
}
}
}
}
Usage
Options
| Flag | Description |
|---|---|
-d, --dry-run | Run read-only checks without changing any Docker Hub settings. |
Errors
The precheck and identity validation stop without sending changes when they emit one of these messages. <namespace> and <repository> are replaced with the configured values, and <count> or <slug> identifies the invalid input.
| Condition | Message |
|---|---|
| Login not found | No Docker Hub login found. Run "docker login". |
| Authentication failed | Unable to authenticate with Docker Hub using the stored login. |
| Repository missing | Docker Hub repository <namespace>/<repository> does not exist. Push the first image, then run the recipe again. |
| Write permission missing | The Docker Hub login does not have write access to <namespace>/<repository>. |
| Short description missing | Docker Hub sync-identity requires "project.description.short" in nova.config.json. |
| Short description too long | Docker Hub's short description limit is 100 characters; the configured value has <count>. |
| README too long | Docker Hub's overview limit is 25,000 characters; README.md has <count>. |
| Too many categories | Docker Hub accepts at most 3 repository categories. |
| Category list unavailable | Unable to validate Docker Hub categories against the live category list. |
| Unknown category | Docker Hub category slug "<slug>" was not found in the live category list. |