Octopack Push to https URL


(jian huang) #1

Hi Octopus team,

I used to use
/p:OctoPackPublishPackageToHttp=“http://octopus.domain/nuget/packages?replace=true
inside the TFS build definition to push the nuget package onto Octopus server, and it is working fine.

Today I have enabled the https binding, and is trying to use below syntax to push nuget pacakge to Octopus server, it still builds success, but there is no nuget package being pushed to Octopus server
/p:OctoPackPublishPackageToHttps="https://octopus.domain/nuget/packages?replace=true"

If I use below, error will occur during the build process.
/p:OctoPackPublishPackageToHttp=“https://octopus.domain/nuget/packages?replace=true

Please help :slight_smile:


(Matthew Casperson) #2

Hi @jianhuang, thanks for reaching out.

Octopack does not have a OctoPackPublishPackageToHttps option, so that setting would be ignored and no attempt would be made to push the package. You should be able to push to a https URL with the OctoPackPublishPackageToHttp option though. What is the error that is generated when you attempt to do so?

Regards
Matt C


(jian huang) #3

Hi Matt,

I could not find any specific/detail error logs, but when I just use OctoPackPublishPackageToHttp, the build will fail, and no package being pushed to Octopus Server using https URL.


(Shannon Lewis) #4

Hi,

Are you using self hosted TFS or are you using Azure DevOps. I’ve certainly noticed that in the latter the error details aren’t always obvious. When the build fails you get a summary that isn’t entirely helpful, but if you click on/near the error it will pop up a panel with the entire build log detail in it. Would you be able to try that and maybe send us a screenshot of what you’re seeing?

Regards
Shannon


(jian huang) #6

Hi Shannon,

We are using TFS to manage all the builds.

This is the error I get when I use HTTPS to push.

image
image.png853x90 8.67 KB

And when I click on the link, it directs me to the following
Exec Command=’"$(OctoPackNuGetExePath)" push “@(OctoPackBuiltPackages)” $(OctoPackPublishApiKey) -Source $(OctoPackPublishPackageToHttp) $(OctoPackNuGetPushProperties)’ Condition="’$(OctoPackPublishPackageToHttp)’ != ‘’"

everything stays the same except change the octopus URL from HTTP to HTTPs. Where HTTP works fine all the time.


(Shannon Lewis) #7

Hi @jianhuang,

OctoPack is using Nuget.exe to actually to the package push, would you be able to try running it directly to see if you can then see the error it returns?

It is possible that there is something about the SSL certificate or the TLS settings between the build agent that is causing the error. E.g. the certificate chain isn’t trusted or the TLS version needs to be 1.2 or something like that. Unfortunately because of the way OctoPack launches NuGet.exe errors are often hard not surfaced particularly well.

Another option would be to switch away from using OctoPack and using our TFS extension. The extension uses our octo.exe tool under the hood rather than NuGet.exe and this might alleviate the issues.

Regards
Shannon


(jian huang) #8

Hi Shannon,

I tried to run NuGet.exe to push the package, looks like there is not connection between build server to this new HTTPS site, the firewall issue. Thanks for the help, I will close this discussion, if anything comes up I will open a new discussion.

Jian


(system) #10

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