Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(source-control): explain clone failures #9831

Closedlnieuwenhuis(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/9831/headopened View on GitHub

Showing 2 changed files with 127 additions and 1 deletion (loading 1).

x
0 of 2 viewed, 2 left
127 additions and 1 deletionapps/server/src/sourceControl/SourceControlRepositoryService.test.tsModified
View file
@@ -197,6 +197,132 @@
}).pipe(Effect.provide(NodeServices.layer)),
​
+it.effect("returns actionable, transport-safe clone failures", () => {
+ const cases: ReadonlyArray<{ stderr: string; expected: string; remoteUrl?: string }> = [
+ {
+ stderr: "Host key verification failed.\nfatal: Could not read from remote repository.\n",
+ expected:
+ "SSH could not verify the source control host. Add its host key to known_hosts and try again.",
+ },
+ {
+ stderr: "git@example.com: Permission denied (publickey).\n",
+ expected:
+ "SSH authentication failed. Add an SSH key to your source control account and try again.",
+ },
+ {
+ stderr:
+ "git@ssh.dev.azure.com: Public key authentication failed.\nfatal: Could not read from remote repository.\n",
+ expected:
+ "SSH authentication failed. Add an SSH key to your source control account and try again.",
+ },
+ {
+ stderr:
+ "fatal: could not read Username for 'https://example.com': terminal prompts disabled\n",
+ expected:
+ "HTTPS authentication failed. Configure Git credentials for the source control host and try again.",
+ },
+ {
+ stderr: