windmill-labs/windmill · error
No git-sync repositories configured in workspace
Error message
No git-sync repositories configured in workspace
What it means
`selectRepository` is the shared git-sync repository picker in the windmill CLI. It throws this when the workspace has zero git-sync repositories, so there is nothing to select for the requested operation (pull/push/etc.).
Source
Thrown at cli/src/utils/utils.ts:247
export function printSync(input: string | Uint8Array) {
process.stdout.write(
typeof input === "string" ? input : Buffer.from(input)
);
}
// Repository interface for shared selection logic
export interface Repository {
git_repo_resource_path: string;
}
// Shared repository selection logic
export async function selectRepository<T extends Repository>(
repositories: T[],
operation?: string
): Promise<T> {
if (repositories.length === 0) {
throw new Error("No git-sync repositories configured in workspace");
}
if (repositories.length === 1) {
const repoPath = repositories[0].git_repo_resource_path.replace(
/^\$res:/,
""
);
log.info(colors.cyan(`Auto-selected repository: ${colors.bold(repoPath)}`));
return repositories[0];
}
// Check if we're in a non-interactive environment
const isInteractive = !!process.stdin.isTTY && !!process.stdout.isTTY;
if (!isInteractive) {
const repoPaths = repositories.map((r) =>
r.git_repo_resource_path.replace(/^\$res:/, "")
);View on GitHub (pinned to e474e8803c)
Solutions
- Create a git-sync repository in the Windmill UI (Workspace → Git sync) first
- Verify you are targeting the intended workspace (`wmill workspace list` / `--workspace` flag)
- Check that your token's workspace matches the one containing the repositories
Example fix
// before wmill git-sync pull # against empty workspace // No git-sync repositories configured in workspace // after: create the repo in Workspace Settings → Git Synchronization, then wmill git-sync pull
Defensive patterns
Strategy: validation
Validate before calling
const repos = await client.listGitSyncRepositories(); // or check config before running
if (!repos || repos.length === 0) {
console.error('No git-sync repositories in this workspace; create one in Workspace Settings first.');
process.exit(1);
} Try / catch
try {
await runGitSyncCommand();
} catch (e) {
if (e.message === 'No git-sync repositories configured in workspace') {
console.error('Target workspace has no git-sync repos. Check workspace selection and create a repo in the UI.');
} else throw e;
} Prevention
- Confirm the target workspace with `wmill workspace list` before sync commands
- Create git-sync repositories in the UI before automating pull/push
- In CI, assert the workspace is fully configured as a pre-flight step
When it happens
Trigger: Running a git-sync command (e.g. repository auto-selection via `selectAndLogRepository`) against a workspace where no git-sync repositories have been created.
Common situations: Pointing the CLI at a fresh/empty workspace or the wrong workspace/URL; repositories not yet set up in the UI; credentials landing on a workspace without repos.
Related errors
- ⚠️ No workspace bound. Sync commands will not work without
- No instance found, please add one first
- No local instance profile named ${instanceName}
- No active instance. Run 'wmill instance add' or pass --insta
- Active instance ${activeName} not found in config
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/0dde8d93545228a9.
Report an issue: GitHub.