Issue ID:
Type
Feature
Title:
Improve error message when SSH Agent temp path is incorrect
Created:
9/12/2023 12:42:45 PM by Alex
Status:
Awaiting Release on
Last pulled:
9/22/2023 10:41:05 PM
Description:
I accidently entered /var/temp as the temp path, and got this error: ``` Unhandled exception trying to connect to SSH server. Details:Inedo.Agents.Ssh.SftpException: SFTP Protocol Error (permission denied) at Inedo.Agents.Ssh.Libssh2.Libssh2Session.HandleError(Int32 res, IntPtr sftp) at Inedo.Agents.Ssh.Libssh2.Libssh2Session.WithSocketAsync[T](Func`1 run, Func`2 getError, IntPtr sftp, CancellationToken cancellationToken) at Inedo.Agents.Ssh.Libssh2.Libssh2SftpChannel.CreateDirectoryAsync(String path, PosixFileMode mode) at Inedo.Agents.Ssh.Libssh2.Libssh2SftpChannel.CreateDirectoryAsync(String path, PosixFileMode mode) at Inedo.Agents.Ssh.Libssh2.Libssh2SftpChannel.CreateDirectoryAsync(String path, PosixFileMode mode) at Inedo.Agents.Ssh.Libssh2.Libssh2SftpChannel.CreateDirectoryAsync(String path, PosixFileMode mode) at Inedo.Agents.Hosting.ScriptableRemoteAgentHost.EnsureAgentBinariesAsync(Func`1 getPackage, IEnumerable`1 extensions, Func`2 openExtension) at Inedo.BuildMaster.Windows.ServiceApplication.Agents.SshAgentConnection.GetRemoteHostAsync() at Inedo.BuildMaster.Windows.ServiceApplication.Agents.SshAgentConnection.EnsureHostedAgentAsync() at Inedo.BuildMaster.Windows.ServiceApplication.ServerCheckerRunner.CheckSshAgentAsync(TaskRunnerSubtask`1 context, Servers server, SshAgent agent) ``` I suppose in `EnsureAgentBinariesAsync`, we should try/catch around `CreateDirectoryAsync` and clarify the error.