windmill-labs/windmill · warning
Could not check backend for git-sync settings: ${(error as E
Error message
Could not check backend for git-sync settings: ${(error as Error).message} What it means
During `wmill init`, after binding a workspace the CLI checks the Windmill backend for git-sync settings so it can apply them to the generated wmill.yaml. Any failure raised by that backend check (network error, auth failure, API error from pullGitSyncSettings) is caught and downgraded to this warning; init then continues with default settings instead of aborting.
Source
Thrown at cli/src/commands/init/init.ts:232
log.info("Applying git-sync settings from backend...");
const { pullGitSyncSettings } = await import(
"../gitsync-settings/gitsync-settings.ts"
);
const gsOpts = {
...(opts as GlobalOptions),
workspace: boundProfile.name,
repository: opts.repository,
jsonOutput: false,
diff: false,
replace: true,
};
(gsOpts as any).__secret_workspace = boundProfile;
await pullGitSyncSettings(gsOpts);
log.info(colors.green("Git-sync settings applied from backend"));
}
}
} catch (error) {
log.warn(
`Could not check backend for git-sync settings: ${(error as Error).message}`
);
log.info("Continuing with default settings");
}
}
}
await refreshPrompts({ yes: opts.useDefault === true });
// Generate the IDE tsconfig (managed tsconfig.wmill.json + user tsconfig.json
// that extends it). Independent of any workspace binding — it's purely local.
try {
await refreshTsconfig({ yes: opts.useDefault === true });
} catch (error) {
log.warn(
`Could not generate tsconfig: ${
error instanceof Error ? error.message : error
}`View on GitHub (pinned to e474e8803c)
Solutions
- Verify connectivity to the instance: `curl <baseUrl>/api/version` or open the Windmill UI at the configured remote URL.
- Re-check the bound workspace with `wmill workspace list`; re-bind with `wmill workspace bind` if the token is stale or the remote URL is wrong.
- If backend git-sync settings are not needed, run `wmill init --use-default` (or answer 'default' at the prompt) to skip the check entirely.
- If the repository option is required, ensure the repository path (u/user/repo) exists and the token has access to it.
- Inspect the full message for the underlying cause (401/403 => auth, ECONNREFUSED => server down, 404 => feature/path missing).
Example fix
// before wmill init --use-backend // after (skip backend check when offline / credentials uncertain) wmill init --use-default
Defensive patterns
Strategy: try-catch
Validate before calling
// before init: confirm the backend is reachable and the profile is valid
const res = await fetch(`${profile.remote}/api/workspaces/list`, {
headers: { Authorization: `Bearer ${profile.token}` },
});
if (!res.ok) console.warn(`backend check will fail: HTTP ${res.status}`); Type guard
function isNetworkError(err: unknown): err is Error {
return err instanceof Error && /ECONNREFUSED|ENOTFOUND|fetch failed|401|403/.test(err.message);
} Try / catch
try {
await pullGitSyncSettings(opts);
} catch (error) {
const msg = error instanceof Error ? error.message : String(error);
log.warn(`Could not check backend for git-sync settings: ${msg} — continuing with default settings`);
} Prevention
- Run `wmill workspace list` and a cheap authenticated API call before init in CI.
- Use `wmill init --use-default` when you know you don't need backend git-sync settings.
- Keep the remote URL and token fresh: re-run `wmill login`/`wmill workspace bind` after token rotation.
- Check VPN/proxy reachability of the instance before bootstrapping repos in sandboxed environments.
When it happens
Trigger: Running `wmill init` (or `wmill init --use-backend` / `--repository <repo>`) when the workspace is bound and the backend check via pullGitSyncSettings fails: backend unreachable (wrong baseUrl, server down), invalid/expired token, non-2xx API response, or a malformed gitsync settings payload.
Common situations: Offline or behind a proxy/VPN; remote URL typo in `wmill workspace` profile; token revoked or rotated after binding; self-hosted instance not yet running or on a different port; enterprise git-sync feature not configured on the instance.
Related errors
- connection error: ${err instanceof Error ? err.message : err
- Could not fetch datatable schemas: ${err.message}
- Dependency generation failed: ${queueResponse.status} ${queu
- Failed to poll dependencies job ${jobId}: ${e?.message ?? e}
- No response body for SSE stream
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/a23a9e63d9ffc99b.
Report an issue: GitHub.