Rework [stage]

This commit is contained in:
crschnick
2026-03-21 10:51:00 +00:00
parent 8049765d84
commit fd2df3e912
3 changed files with 7 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import io.xpipe.app.issue.ErrorAction;
import io.xpipe.app.issue.ErrorEvent;
import io.xpipe.app.issue.ErrorEventFactory;
import io.xpipe.app.process.*;
import io.xpipe.app.util.DocumentationLink;
import io.xpipe.core.FilePath;
import io.xpipe.core.OsType;
@@ -118,6 +119,10 @@ public class SshIdentityStateManager {
var ex = new IllegalStateException("Unable to list agent identities via command ssh-add -l:\n" + joined
+ "\n\n" + "Please check whether the agent is running correctly%s.".formatted(posixMessage));
var eventBuilder = ErrorEventFactory.fromThrowable(ex).expected();
if (joined.toLowerCase().contains("signing failed: agent refused operation") ||
joined.toLowerCase().contains("error connecting to agent: connecting refused")) {
eventBuilder.documentationLink(DocumentationLink.SSH_AGENT_REFUSAL);
}
ErrorEventFactory.preconfigure(eventBuilder);
throw ex;
}

View File

@@ -71,6 +71,7 @@ public enum DocumentationLink {
SSH_CONNECTION_CLOSED("troubleshoot/ssh#connection-closed-by-remote-host"),
SSH_KEY_PERMISSIONS("troubleshoot/ssh#key-permissions-too-open"),
SSH_NO_ROUTE("troubleshoot/ssh#no-route-to-host"),
SSH_AGENT_REFUSAL("troubleshoot/ssh#agent-refused-operation"),
SSH_CONNECTION_TIMEOUT("troubleshoot/ssh#connection-timeout"),
SSH_SHELL_TIMEOUT("troubleshoot/ssh#shell-timeout"),
SSH_CONFIG("guide/ssh#config-files"),

View File

@@ -1 +1 @@
22.0-10
22.0-11