I am building my application using Jenkins and using Octopack to package and push to Octopus on the same server. There are two websites and four Windows services. The services package and deploy fine. The first website gets a Response status code does not indicate success: 403 (Forbidden).
response. My MSBuild command is:
$Workspace = $env:WORKSPACE
& $Workspace\.nuget\NuGet.exe restore $Workspace\Build.sln
$env:REVISION = Get-Content $Workspace\.version
$msbuild = 'C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe'
&$msbuild $Workspace\Build.sln /t:Clean /t:Rebuild /nologo /p:Configuration=Release /p:RunOctoPack=true /p:OctoPackPublishPackageToHttp=http://jenkins:8081/nuget/packages /p:OctoPackPublishApiKey=$env:OctopusApiKey "/p:OctoPackNuGetProperties=version=$env:REVISION.$env:BUILD_NUMBER" /p:OctoPackPackageVersion=$env:REVISION.$env:BUILD_NUMBER /p:OctoPackEnforceAddingFiles=true
The change I made was to use a built in Octopus service account instead of my Domain account. I created the user, generated the API key (stored in $env:OctopusApiKey
). I had not added this user to a team with the Package Publisher role. When I do, it can push the website packages without issue.
In Diagnostics:
You do not have permission to perform this action. Please contact your Octopus administrator. Missing permission: BuiltInFeedPush (BuildService requesting http://jenkins:8081/nuget/packages/)
Why could it push four out of my six packages without access to this role?