IgnoreSslErrors doesn't seem to be working in Octo commandline


(Simon Stevenson) #1

I am using Octopus Deploy Command Line Tool, version 4.41.5

The following commands give the same output

C:\agent_work_tool\Octo\4.41.5\x64\Octo.cmd list-projects --server https://server-ip/

C:\agent_work_tool\Octo\4.41.5\x64\Octo.cmd list-projects --server https://server-ip/ --ignoreSslErrors

The output is this repeated numerous times:

The following certificate errors were encountered when establishing the HTTPS connection to the server: RemoteCertificateNameMismatch
Certificate subject name: CN=public-server-name.australiaeast.cloudapp.azure.com
Certificate thumbprint: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD

Then:

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.WinHttpException: A security error occurred
at System.Net.Http.WinHttpRequestCallback.OnRequestSendingRequest(WinHttpRequestState state)
at System.Net.Http.WinHttpRequestCallback.RequestCallback(IntPtr handle, WinHttpRequestState state, UInt32 internetStatus, IntPtr statusInformation, UInt32 statusInformationLength)
— End of inner exception stack trace —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.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__531.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.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.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.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.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.d__11.MoveNext() in Z:\buildAgent\workDir\d8818cc5a2905d1\source\Octopus.Client\OctopusAsyncClient.cs:line 116
— 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.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


(Simon Stevenson) #2

Note this works with 4.34.0:

& “C:\agent_work_tasks\OctopusCreateRelease_4e131b60-5532-4362-95b6-7c67d9841b4f\2.0.135\Octo.exe” list-projects --server https://server/ --ignoreSslErrors
Octopus Deploy Command Line Tool, version 4.34.0

The following certificate errors were encountered when establishing the HTTPS connection to the server: RemoteCertificateNameMismatch
Certificate subject name: CN=public-server-name.australiaeast.cloudapp.azure.com
Certificate thumbprint: ABCDABCDABCDABCDABCDABCDABCDABCDABCDABCD
Because --ignoreSslErrors was set, this will be ignored.
Handshaking with Octopus server: https://server-ip/
Handshake successful. Octopus version: 2018.4.11; API version: 3.0.0
Authenticated as: Simon my@email
Projects: 6

  • blah

(Kenneth Bates) #4

Hi Simon,

Thanks for getting in touch! I’m terribly sorry you’re hitting this issue. Great to hear you’ve been able to get it going with an older version. This is a known issue and you can track its progress here.

Let me know if you have any further questions or concerns moving forward. :slight_smile:

Best regards,

Kenny


(system) #5

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.