MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / updateGitAuthor

Function updateGitAuthor

services/cloud-agent-next/src/workspace.ts:849–869  ·  view source on GitHub ↗
(
  session: ExecutionSession,
  workspacePath: string,
  gitAuthor: GitAuthorConfig
)

Source from the content-addressed store, hash-verified

847 logger.error('Git clone failed', {
848 error: sanitizeGitOutput(errorMessage),
849 gitUrl: sanitizedGitUrl,
850 });
851
852 if (isSandboxInternalServerError(err)) {
853 throw err;
854 }
855
856 // Detect "repository not found" — a user-caused error (bad repo or
857 // missing access). The sandbox SDK surfaces git stderr in the error
858 // message, including patterns like:
859 // "remote: Repository not found."
860 // "fatal: repository '...' not found"
861 const stderr = extractStderr(err);
862 const haystack = `${errorMessage}\n${stderr}`;
863 if (REPO_NOT_FOUND_PATTERN.test(haystack)) {
864 throw new GitRepositoryNotFoundError(sanitizedGitUrl);
865 }
866
867 throw new GitCloneFailedError(sanitizedGitUrl, sanitizeGitOutput(errorMessage));
868 }
869}
870
871export type RestoreWorkspaceOptions = {
872 githubRepo?: string;

Callers 3

workspace.test.tsFile · 0.90
cloneGitRepoFunction · 0.85
refreshGitRemoteTokenMethod · 0.85

Calls 2

shellQuoteFunction · 0.90
timedExecFunction · 0.85

Tested by

no test coverage detected