TeamCity deployment failed after enabling HTTPS in Octopus Deploy


The TeamCity deployment failed after I enabled HTTPS for Octopus Deploy.

The HTTP requests can be redirected to HTTPS without any problems if I access the URL from browsers, but if I try to create release from TeamCity with HTTP URL, the redirection does not work.

I receive message “HTTPS is required for this request” in TeamCity build log.

Are there any settings I am missing in Octopus?



Octopus Deploy: v2018.9.9
TeamCity: 2018.1.3
Octopus Deploy integration: 4.42.0

[14:15:13] [Octopus Deploy] Creating release…
[14:15:13] [Octopus Deploy] POST http://dev-octopusdeploy/api/releases?ignoreChannelRules=False
[14:15:13] [Octopus Deploy] There was a problem with your request.
[14:15:13] [Octopus Deploy]
[14:15:13] [Octopus Deploy] - HTTPS is required for this request
[14:15:13] [Octopus Deploy]
[14:15:13] [Octopus Deploy] Error from Octopus server (HTTP 400 BadRequest)
[14:15:13] [Octopus Deploy] Exit code: -7
[14:15:13] [Octopus Deploy] Octo.exe exit code: -7

Is it possible to redirect HTTP post to HTTPS?



Hi @Ge, thanks for reaching out.

The Octopus CLI tools to not follow redirects, and there is no option to enable that functionality. If the Octopus server only exposes HTTPS then the URL in the Team City build will need to have the https prefix.

Matt C

Thanks for the clarification!

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