Search code examples
c#.netnuget-packageazure-artifacts

NUGET update packages from command line to VSTS


I had created private nuget feed inside my VSTS. Initially, i pushed 4 nuget packages from commandline to VSTS without any issues.

Now, i am trying to update few packages with the latest updates. But, getting the below error to update inside VSTS feed.

Commands i used to update my feeds with 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

I am receiving below error for the above command

The specified source 'xxx.Shared.Nuget' is invalid. Please provide a valid source.

Please note that, i had changed my nuget version from 1.0.2 to 1.0.3


Solution

  • 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. I fixed this error by giving the same url what i have given to visual studio during package url integration, Then, it started working.