fix: workspace creation SSH authentication

- GitService.clone() now accepts ssh_key and sets up GIT_SSH_COMMAND env
- WorkspaceManager.create() loads repo SSH key from DB and decrypts it
- Both workspace create endpoints pass session for SSH key lookup

Quality gates: ruff clean, pytest workspaces API (9 passed, 1 skipped)
This commit is contained in:
2026-06-01 19:42:51 +02:00
parent d70b8e2363
commit ec6d4ad496
3 changed files with 68 additions and 15 deletions
+2 -2
View File
@@ -95,7 +95,7 @@ async def create_workspace_top_level(
manager = WorkspaceManager()
try:
workspace = await manager.create(repo, user_id, name, branch)
workspace = await manager.create(repo, user_id, name, branch, session=session)
session.add(workspace)
await session.commit()
except Exception as exc:
@@ -191,7 +191,7 @@ async def create_workspace(
manager = WorkspaceManager()
try:
workspace = await manager.create(repo, user_id, name, branch)
workspace = await manager.create(repo, user_id, name, branch, session=session)
session.add(workspace)
await session.commit()
except Exception as exc: