Open mrdavidlaing opened 9 years ago
Attempting to publish a nuget package:
build.ps1 -nuget_api_key 76b0XXXXX NugetPublish
However, it seems that it is using the incorrect default -Source setting, failing with
-Source
psake version 4.4.0 Copyright (c) 2010-2014 James Kovacs & Contributors -------------------------[SetupContext]------------------------- sln_file_info : C:\dev\log4net.Appenders.Contrib\src\log4net.Appenders.Contrib.sln solution_context : Crane.Core.Api.SolutionContext chocolatey_api_key : configuration : Debug nuget_api_url : https://www.nuget.org/api/v2/ nuget_api_key : 76b040c7XXXX nuget_file : build_version : 2.0.0.0 build_dir : C:\dev\log4net.Appenders.Contrib\build verbose : packages_folder : C:\dev\log4net.Appenders.Contrib\src\packages nuget_artifacts_dir : C:\dev\log4net.Appenders.Contrib\build-output\nuget root_dir : C:\dev\log4net.Appenders.Contrib teamcity_build : False build_artifacts_dir : C:\dev\log4net.Appenders.Contrib\build-output is_git_repo : True chocolatey_api_url : -------------------------[NugetExists]------------------------- -------------------------[NugetPack]------------------------- Attempting to build package from 'log4net.Appenders.Contrib.nuspec'. Successfully created package 'C:\dev\log4net.Appenders.Contrib\build-output\nuget\log4net.Appenders.Contrib.2.0.0.0.nup kg'. -------------------------[NugetPublish]------------------------- Error: 02/07/2015 15:06:12: At C:\dev\log4net.Appenders.Contrib\build\modules\nugettasks.psm1:21 char:5 + Invoke-CraneNugetPublishAllProjects $ global:context.solution_context -NugetO ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~ [<<==>>] Exception: Error executing nuget push for project log4net.Appenders.Contrib.Command: C:\dev\log4net.Ap penders.Contrib\build\NuGet.exe push "C:\dev\log4net.Appenders.Contrib\build-output\nuget\log4net.Appenders.Contrib.2.0 .0.0.nupkg" -Source https://www.nuget.org/api/v2/ -ApiKey 76b040c7XXX, StandardOutput: Pushing log4net.Appenders.Contrib 2.0.0.0 to 'https://www.nuget.org/api/v2/'..., ErrorOutput: Failed to process request. 'Meth od Not Allowed'. The remote server returned an error: (405) Method Not Allow
Explicitly setting the nuget_api_url works:
nuget_api_url
.\build.ps1 -nuget_api_key 76b040c7-XXX -nuget_api_url https://www.nuget.org NugetPublish
Attempting to publish a nuget package:
However, it seems that it is using the incorrect default
-Source
setting, failing withExplicitly setting the
nuget_api_url
works: