Nuget External Feed Could Not Find the manually uploaded Nupkg Package From Jfrog Artifactory

Hi there,
I am pushing the Nuget package to nuget Artifactory from Octopus Custom Script template Step however I can not find this nuget package from external feed in Octopus. I can download that nuget package from browser directly using Artifactory URL, I can also search it in JFrog Console. But It can’t be detected by Octopus external nuget feed.

I can download the nuget package like this -
https://artifactory.internal.myorg/api/nuget/mynugetrepo/mynugetpackage.1.0.0.nupkg

Below is my code to upload the Zip file as nupkg -

$nugetFileName = MyNugetPackage.nupkg
$headers = New-Object System.Collections.Generic.Dictionary[[String],[String]]
$headers.Add(X-JFrog-Art-Api, $ArtifactoryApiKey)
$artifactoryURL = $ArtifactoryBaseUrl/$nugetFileName
Invoke-RestMethod $artifactoryURL -Headers $headers -Method Put -InFile .$zipfileName -ContentType multipart/form-data

Hi @harsh_tech,

Thanks for reaching out, I’d be happy to help get to the bottom of what’s going on here!

Just confirming if you are getting any specific error messages when attempting to search for the package in the External Feed or is it just returning no results? Are you able to locate other packages ok or is this the first package that’s been added?

I’ve ran some tests on my end to confirm if it’s picking up packages ok and it all seems to work as expected on my end, however I did need to modify your script a little bit which I shared below:

$ArtifactoryApiKey = "XXXXXXXXXX"
$ArtifactoryBaseUrl = "https://<jfrogUrl>.jfrog.io/artifactory/<nugetRepo>"
$nugetFileName = "testNuget.nupkg"
$zipFileName = "testNuget.1.0.0.nupkg"

$headers = @{ "X-JFrog-Art-Api" = $ArtifactoryApiKey }

$artifactoryURL = "$ArtifactoryBaseUrl/$nugetFileName"

Invoke-RestMethod $artifactoryURL -Headers $headers -Method Put -InFile $zipFileName -ContentType multipart/form-data

Would you be willing to share you Octopus External Feed configuration? Feel free to redact any sensitive info!

Feel free to let me know if you have any questions at all!

Best Regards,

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