2016-05-24 59 views
1

我在Team Services上有一個私人的NuGet源,以前是Visual Studio Team Services。有問題的身份驗證,但重置我的團隊服務替代憑據,清除我的全局配置中的東西,並使用nuget sources add重新添加憑據的源。推送到Visual Studio Team Services NuGet源提供了400個BadRequest

所以我不認爲這是一個身份驗證問題。錯誤已經改變。

我的命令行:

NuGet.exe push BrandPortaCoreDistrib.1.2.4.0.nupkg -Source https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/Libraries/nuget/v3/index.json -Verbosity detailed 

但我得到這個在屏幕上:

WARNING: No API Key was provided and no API Key could be found for 'https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/14e755d8-0994-4b9d-b607-a79928cc4597/nuget/v2/'. To save an API Key for a source use the 'setApiKey' command. 
Pushing BrandPortaCoreDistrib.1.2.4.0.nupkg to 'https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/14e755d8-0994-4b9d-b607-a79928cc4597/nuget/v2/'... 
    PUT https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/14e755d8-0994-4b9d-b607-a79928cc4597/nuget/v2/ 
    Unauthorized https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/14e755d8-0994-4b9d-b607-a79928cc4597/nuget/v2/ 1043ms 
Using credentials from config. UserName: [email protected] 
    PUT https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/14e755d8-0994-4b9d-b607-a79928cc4597/nuget/v2/ 
    BadRequest https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/14e755d8-0994-4b9d-b607-a79928cc4597/nuget/v2/ 5054ms 
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request). 
    at NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__16.MoveNext() 
    --- End of inner exception stack trace --- 
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) 
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) 
    at NuGet.CommandLine.Command.Execute() 
    at NuGet.CommandLine.Program.MainCore(String workingDirectory, String[] args) 
---> (Inner Exception #0) System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request). 
    at NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__16.MoveNext()<--- 

關鍵這是錯誤請求中的所有中間。沒有其他狀態信息,沒有錯誤給予幫助。

包版本已不在供稿中。

我以前從這個項目推送到這個飼料使用這個nuspec和我建立的nupkgs,所以我不知道爲什麼這個世界今天討厭我。

我正在使用NuGet.exe 3.4.3.855,並且我是Team Services中源的所有者。

奇怪的是,在屏幕上吐出的廢話都談到了v2的URL,但我的團隊服務提要是v3。

回答

6

添加「-ApiKey VSTS」在你的命令:

NuGet.exe push BrandPortaCoreDistrib.1.2.4.0.nupkg -Source https://brand.pkgs.visualstudio.com/DefaultCollection/_packaging/Libraries/nuget/v3/index.json -Verbosity detailed -ApiKey VSTS 
+0

我不認爲我需要它,因爲我用我的證書認證,而且,我會預期一個auth不同的代碼錯誤。謝謝埃迪。 –

相關問題