Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

ClosedKyleKincer(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/5005/headopened View on GitHub

Showing 2 changed files with 122 additions and 2 deletions.

x
0 of 2 viewed, 2 left
68 additions and 0 deletionsapps/server/src/sourceControl/SourceControlRepositoryService.test.tsModified
View file
@@ -195,6 +195,74 @@
}).pipe(Effect.provide(NodeServices.layer)),
​
+it.effect("returns actionable, transport-safe clone failures", () => {
+ const cases = [
+ {
+ 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:
+ "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:
+ "ssh: Could not resolve hostname example.com: nodename nor servname provided\nfatal: Could not read from remote repository.\n",
+ expected:
+ "The source control host could not be resolved. Check your network or VPN connection and try again.",
+ },
+ {
+ stderr: "fatal: an unrecognized clone failure\n",