OctopusDeploy / OctopusClients

| Public | Octopus.Client for commanding Octopus servers

Home Page:https://octopus.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Octopus Client 4.38.1 on Mac does not respect --ignoreSslErrors

pwrmiller opened this issue · comments

Running the octopus CLI with --ignoreSslErrors doesn't actually ignore SSL errors. This is unexpected!

Platform
Mac OS X High Sierra 10.13.6
Octopus Client 4.38.1

Example
octo list-projects --server https://my_server_address.com --apiKey API-SECRET --ignoreSslErrors

Result

System.Exception: Unable to connect to the Octopus Deploy server. See the inner exception for details. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<DispatchRequest>d__53`1.MoveNext() in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Client\OctopusAsyncClient.cs:line 553
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Get>d__32`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<EstablishSession>d__52.MoveNext() in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Client\OctopusAsyncClient.cs:line 481
   --- End of inner exception stack trace ---
   at Octopus.Client.OctopusAsyncClient.<EstablishSession>d__52.MoveNext() in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Client\OctopusAsyncClient.cs:line 494
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Create>d__12.MoveNext() in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Client\OctopusAsyncClient.cs:line 141
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Client.OctopusAsyncClient.<Create>d__11.MoveNext() in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Client\OctopusAsyncClient.cs:line 122
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.Commands.ApiCommand.<Execute>d__36.MoveNext() in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Cli\Commands\ApiCommand.cs:line 140
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octopus.Cli.CliProgram.Run(String[] args) in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Cli\CliProgram.cs:line 52
Exit code: -3

After investigations into this issue we have found that it is due to an issue with netcoreapp2.0 and the version of cUrl that is installed by default on OSX. I've done some local testing with updating octo.exe to netcoreapp2.1 and have confirmed that in doing so, this issue on OSX seems to be resolved.