fix: SSH auth for workspace sync (fetch/pull/branch check)

- GitService.fetch(), pull(), branch_exists_remotely() now accept ssh_key param
- WorkspaceManager.sync() loads repo SSH key from DB via session
- sync_workspace endpoint passes session to manager.sync()

Quality gates: ruff clean, pytest workspaces API (9 passed, 1 skipped)
This commit is contained in:
2026-06-01 19:50:07 +02:00
parent ec6d4ad496
commit 9a036f1968
3 changed files with 91 additions and 47 deletions
+1 -1
View File
@@ -346,7 +346,7 @@ async def sync_workspace(
workspace = await _get_workspace(session, workspace_id, repo_id)
manager = WorkspaceManager()
result = await manager.sync(workspace)
result = await manager.sync(workspace, session=session)
if result.branch_deleted:
raise HTTPException(