diff --git a/apps/api/src/api/git_repositories.py b/apps/api/src/api/git_repositories.py index 6d0e8a6..5190afe 100644 --- a/apps/api/src/api/git_repositories.py +++ b/apps/api/src/api/git_repositories.py @@ -153,9 +153,10 @@ def _preflight_remote_repository(remote_url: str, ssh_key: SSHKey | None = None) os.unlink(key_path) if result.returncode != 0: + logger.error("Preflight check failed for %s: stderr=%s", remote_url, result.stderr) raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST, - detail="repository not found or inaccessible", + detail=f"repository not found or inaccessible: {result.stderr}", ) @@ -185,6 +186,7 @@ def _clone_working_repository(remote_url: str, repo_path: str, ssh_key: SSHKey | os.unlink(key_path) if result.returncode != 0: + logger.error("Clone failed for %s: stderr=%s", remote_url, result.stderr) raise HTTPException( status_code=status.HTTP_400_BAD_REQUEST, detail=f"failed to clone repository: {result.stderr}",