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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user