diff --git a/app/src/main/java/io/xpipe/app/cred/SshIdentityStateManager.java b/app/src/main/java/io/xpipe/app/cred/SshIdentityStateManager.java index 59bd94f86..7add60aeb 100644 --- a/app/src/main/java/io/xpipe/app/cred/SshIdentityStateManager.java +++ b/app/src/main/java/io/xpipe/app/cred/SshIdentityStateManager.java @@ -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; } diff --git a/app/src/main/java/io/xpipe/app/util/DocumentationLink.java b/app/src/main/java/io/xpipe/app/util/DocumentationLink.java index 5828c95db..707d95033 100644 --- a/app/src/main/java/io/xpipe/app/util/DocumentationLink.java +++ b/app/src/main/java/io/xpipe/app/util/DocumentationLink.java @@ -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"), diff --git a/version b/version index 6a57adb5e..3e57de730 100644 --- a/version +++ b/version @@ -1 +1 @@ -22.0-10 +22.0-11