简体   繁体   English

从命令行到VSTS的NUGET更新包

[英]NUGET update packages from command line to VSTS

I had created private nuget feed inside my VSTS. 我在VSTS中创建了私有的nuget feed。 Initially, i pushed 4 nuget packages from commandline to VSTS without any issues. 最初,我将4个nuget软件包从命令行推送到VSTS,没有任何问题。

Now, i am trying to update few packages with the latest updates. 现在,我正在尝试使用最新更新来更新一些软件包。 But, getting the below error to update inside VSTS feed. 但是,出现以下错误以在VSTS feed中进行更新。

Commands i used to update my feeds with VSTS 我用来通过VSTS更新供稿的命令

nuget.exe push -Source "xxx.Shared.Nuget" -ApiKey VSTS xxx.Infra.Design.Patterns.1.0.3.nupkg

Please provide credentials for: 请提供以下凭据:

nuget.exe push -Source "xxx.Shared.Nuget" -ApiKey VSTS xxx.Infra.Design.Patterns.1.0.3.nupkg Please provide credentials for: https://xxx.pkgs.visualstudio.com/_packaging/xxx.Shared.Nuget/nuget/v3/index.json nuget.exe push-来源“ xxx.Shared.Nuget” -ApiKey VSTS xxx.Infra.Design.Patterns.1.0.3.nupkg请提供以下凭据: https ://xxx.pkgs.visualstudio.com/_packaging/xxx 。 Shared.Nuget /的NuGet / V3 / index.json

I am receiving below error for the above command 我收到上述命令的以下错误

The specified source 'xxx.Shared.Nuget' is invalid. 指定的源“ xxx.Shared.Nuget”无效。 Please provide a valid source. 请提供有效来源。

Please note that, i had changed my nuget version from 1.0.2 to 1.0.3 请注意,我已将nuget版本从1.0.2更改为1.0.3

The problem is if we add a nuget package url to visual studio and after that if you give different name while creating and adding url to command line, this error occurs. 问题是如果我们在Visual Studio中添加了一个nuget包的URL,然后在创建并将URL添加到命令行的过程中输入了不同的名称,则会发生此错误。 I fixed this error by giving the same url what i have given to visual studio during package url integration, Then, it started working. 我通过提供与打包URL集成期间给Visual Studio相同的URL来修复了此错误,然后,它开始工作。

That error means NuGet is unable to find a source with key xxx.Shared.NuGet in NuGet.config. 该错误意味着NuGet无法在NuGet.config中找到键为xxx.Shared.NuGet的源。 The quickest way to fix that is by running nuget sources add -Name xxx.Shared.NuGet -Source url-to-your-vsts-feed . 修复此问题的最快方法是通过运行nuget源添加-Name xxx.Shared.NuGet url-to-your-vsts-feed You can find a pre-created version of this command in the Connect to Feed dialog. 您可以在“连接到提要”对话框中找到该命令的预创建版本。 See steps 1 and 2 of this walkthrough . 请参阅本演练的步骤1和2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM