Reputation: 360
I am trying to push my nuget package to artifactory. The commands to do that are embedded in my msbuild file. When I run the commands directly or through the msbuild file on my local machine / jenkins agent machine, I am able to push the package successfully.
But when the same msbuild file is executed using jenkins pipeline, even though the package get pushed to artifactory, I get the response as "Response status code does not indicate success: 403 (Forbidden)" and the hence the build fails.
Can anyone help here?
Upvotes: 0
Views: 2088
Reputation: 13379
Seems a bit strange that you get a 403 and it works but it sounds like an issue with the effective user that the Jenkins job is running under. On Windows you can amend the user by changing it on the Jenkins windows service, I haven't used Jenkins on other OSs but the answer on Run Jenkins jobs on Linux under a User have some pointers about doing the same for Linux.
Obviously in either case make sure your Jenkins user has necessary permissions to push to Artifactory.
Upvotes: 1