Odd Nuget publish issue

Brasey, Cedric (UK - London)'s Avatar

Brasey, Cedric (UK - London)

18 Dec, 2017 11:13 AM

Chaps,

My TFS server builds our solution and then publishes the nugets to our octopus server. Quite straight forward except that two out of the six fail to upload due to "forbidden 403 error". Looking in the octopus log it says i don't have BuiltInFeedPush perms, but i do... as i have BuiltInFeedAdminister, BuiltInFeedDownload, BuiltInFeedPush and FeedView

i'm running on 4.1.4

Any Ideas?

  1. Support Staff 1 Posted by Dalmiro Grañas on 19 Dec, 2017 11:42 PM

    Dalmiro Grañas's Avatar

    Hi,

    Thanks for reaching out. Couple of questions about your setup:

    Best regards,
    Dalmiro

  2. 2 Posted by Brasey, Cedric ... on 20 Dec, 2017 02:54 PM

    Brasey, Cedric (UK - London)'s Avatar

    Hi Dalmiro,

    It does always seem to be the first and last package in our build cycle. I can’t adjust the order that the files are processed as it’s the default “**\bin\**\*.nupkg” pattern.

    As requested please attached the test permission export.

    And here is the extract from our build server
    2017-12-18T12:04:44.4267478Z Invoking nuget with push "C:\agent\_work\3\s\XXXCMSToCMSCommnicationService\bin\Release\XXXCommunicationService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ******** on C:\agent\_work\3\s\XXXCommnicationService\bin\Release\XXXCMSToCMSCommunicationService.1.0.1615.1.nupkg
    2017-12-18T12:04:44.4267478Z C:\agent\agent\worker\tools\NuGet.exe push "C:\agent\_work\3\s\XXXCMSToCMSCommnicationService\bin\Release\XXXCommunicationService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ********
    2017-12-18T12:04:45.7371394Z Pushing XXXCommunicationService 1.0.1615.1 to 'http://XXX/octopus/nuget/packages'...
    2017-12-18T12:04:46.4859346Z ##[error]Failed to process request. 'Forbidden'.
    2017-12-18T12:04:46.4859346Z ##[error]The remote server returned an error: (403) Forbidden..
    2017-12-18T12:04:46.5795340Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe
    2017-12-18T12:04:46.5795340Z Invoking nuget with push "C:\agent\_work\3\s\XXXLetterService\bin\Release\XXXLetterService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ******** on C:\agent\_work\3\s\XXXLetterService\bin\Release\XXXLetterService.1.0.1615.1.nupkg
    2017-12-18T12:04:46.5795340Z C:\agent\agent\worker\tools\NuGet.exe push "C:\agent\_work\3\s\XXXLetterService\bin\Release\XXX.LetterService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ********
    2017-12-18T12:04:47.9055255Z Pushing XXXLetterService 1.0.1615.1 to 'http://XXX/octopus/nuget/packages'...
    2017-12-18T12:04:48.6075210Z Your package was pushed.
    2017-12-18T12:04:48.7011204Z Invoking nuget with push "C:\agent\_work\3\s\XXXLoader\bin\Release\XXXInboundCommunicationService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ******** on C:\agent\_work\3\s\XXXLoader\bin\Release\XXXInboundCommunicationService.1.0.1615.1.nupkg
    2017-12-18T12:04:48.7011204Z C:\agent\agent\worker\tools\NuGet.exe push "C:\agent\_work\3\s\XXXLoader\bin\Release\XXXInboundCommunicationService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ********
    2017-12-18T12:04:50.0115120Z Pushing XXXInboundCommunicationService 1.0.1615.1 to 'http://XXX/octopus/nuget/packages'...
    2017-12-18T12:04:51.0723052Z Your package was pushed.
    2017-12-18T12:04:51.1503047Z Invoking nuget with push "C:\agent\_work\3\s\XXXPaymentService\bin\Release\XXXPaymentService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ******** on C:\agent\_work\3\s\XXXPaymentService\bin\Release\XXXPaymentService.1.0.1615.1.nupkg
    2017-12-18T12:04:51.1503047Z C:\agent\agent\worker\tools\NuGet.exe push "C:\agent\_work\3\s\XXXPaymentService\bin\Release\XXXPaymentService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ********
    2017-12-18T12:04:52.4762962Z Pushing XXXPaymentService 1.0.1615.1 to 'http://XXX/octopus/nuget/packages'...
    2017-12-18T12:04:53.1158921Z Your package was pushed.
    2017-12-18T12:04:53.2094915Z Invoking nuget with push "C:\agent\_work\3\s\XXXRedressService\bin\Release\XXXRedressService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ******** on C:\agent\_work\3\s\XXXRedressService\bin\Release\XXXRedressService.1.0.1615.1.nupkg
    2017-12-18T12:04:53.2094915Z C:\agent\agent\worker\tools\NuGet.exe push "C:\agent\_work\3\s\XXXRedressService\bin\Release\XXXRedressService.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ********
    2017-12-18T12:04:54.5198831Z Pushing XXXRedressService 1.0.1615.1 to 'http://XXX/octopus/nuget/packages'...
    2017-12-18T12:04:55.6118761Z Your package was pushed.
    2017-12-18T12:04:55.7054755Z Invoking nuget with push "C:\agent\_work\3\s\CMS.Web\bin\XXXWeb.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ******** on C:\agent\_work\3\s\CMS.Web\bin\XXXWeb.1.0.1615.1.nupkg
    2017-12-18T12:04:55.7054755Z C:\agent\agent\worker\tools\NuGet.exe push "C:\agent\_work\3\s\CMS.Web\bin\XXXWeb.1.0.1615.1.nupkg" -s http://XXX/octopus/nuget/packages ********
    2017-12-18T12:04:57.0626668Z Pushing XXXWeb 1.0.1615.1 to 'http://XXX/octopus/nuget/packages'...
    2017-12-18T12:05:08.3725943Z ##[error]Failed to process request. 'Forbidden'.
    2017-12-18T12:05:08.3725943Z ##[error]The remote server returned an error: (403) Forbidden..
    2017-12-18T12:05:08.4817936Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe
    2017-12-18T12:05:08.4973935Z Finishing task: NuGetPublisher
    2017-12-18T12:05:08.4973935Z ##[error]Task NuGetPublisher failed. This caused the job to fail. Look at the logs for the task for more details.

    But I can upload these package manually myself from the octopus library screen.

    Ta,

    Cedric

    Cedric Brasey
    Contractor | Deloitte LLP
    D: +44 20 7007 4015
    [email blocked]<mailto:[email blocked]> | www.deloitte.co.uk<http://www.deloitte.co.uk/>

  3. Support Staff 3 Posted by Dalmiro Grañas on 20 Dec, 2017 05:03 PM

    Dalmiro Grañas's Avatar

    Hi Cedric,

    Could you try the following (one at a time):

    1) Change the URL you are pushing packages to be http://XXX/octopus/nuget/packages?replace=true. Now test if all the packages get pushed successfully.

    If this doesn' work, go back to the old URL without ?replace=true

    2) You mentioned that you can upload these packages from the Octopus Library screen. Could you please try creating an API key for your own user and then use that for the package pushing.

    Let me know how those tests go.

    Dalmiro

  4. 4 Posted by Brasey, Cedric ... on 21 Dec, 2017 07:42 AM

    Brasey, Cedric (UK - London)'s Avatar

    Hi Dalmiro,

    The updated url worked a treat!

    Does seem really strange that this would work though as I’ve uploaded quite a few packages that already exists in the library…

    Ta,

    Cedric

    Cedric Brasey
    Contractor | Deloitte LLP
    D: +44 20 7007 4015
    [email blocked]<mailto:[email blocked]> | www.deloitte.co.uk<http://www.deloitte.co.uk/>

  5. Support Staff 5 Posted by Dalmiro Grañas on 21 Dec, 2017 05:48 PM

    Dalmiro Grañas's Avatar

    Hi Cedric,

    If you have alredy been pushing duplicate packages, it does seem odd that the URL change would fix it. In any case, if it works I'll take it!

    Keep me posted if it stops working, ok?

    Cheers,
    Dalmiro

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac