1
votes

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

2

2 Answers

2
votes

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.

0
votes

That error means NuGet is unable to find a source with key xxx.Shared.NuGet in NuGet.config. The quickest way to fix that is by running nuget sources add -Name xxx.Shared.NuGet -Source 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.