appveyor nuget feed from a powershell script before build -- Error Message: missing 'Credential' parameter in the cmdlet
Hi
Before build we call a powershell script with the command Find-Package [-Id].
We then get the error: Cannot access 'https://ci.appveyor.com/nuget/[name]'. Are you missing 'Credential' parameter in the cmdlet?
nuget:
account_feed: true
before_build:
- ps: C:\ciscripts\our-script-with-the-command.ps1
- cmd: nuget restore
If we use nuget sources add -name <markdown-scanner-project-name> -source <markdown-scanner-project-feed-url> we get an error message that: nuget : The source specified has already been added to the list of available package sources. Please provide a unique source.
Question: How to access our appveyor nuget feed from a powershell script, before build?
Thanks
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac

Support Staff 1 Posted by Feodor Fitsner on 25 Aug, 2017 03:27 PM
Hi Joel,
Could you drop a link to a build please?
2 Posted by joel.mccune on 25 Aug, 2017 03:31 PM
The build: https://ci.appveyor.com/project/NTEUCI/intranet-datatoexcel/build/1...
3 Posted by joel.mccune on 25 Aug, 2017 05:15 PM
Hi Feodor,
This is the big picture for what we are trying to do.
We want to know the latest version of a Nuget Package.
Build Reference: https://ci.appveyor.com/project/NTEUCI/intranet-datatoexcel/build/1...
Thanks
Support Staff 4 Posted by Feodor Fitsner on 25 Aug, 2017 08:21 PM
It's possible that
Find-Packagecmdlet is not using credentials from nuget.config file AppVeyor updates with a custom feed.One way to solve that would be extracting credentials from nuegt.config with PowerShell and then passing them to
Find-Packagecmdlet inCredentialparameter.However, a simple approach could be using
nugetcommand, something like:It should return a string
<id> <version>, so you can additionally split it and check second part.Let me know if that helps.
5 Posted by joel.mccune on 28 Aug, 2017 05:49 PM
Thanks your insight was helpful.
Which returned:This is our final result:
Using credentials from config. UserName: nuget <package-id> <version>joel.mccune closed this discussion on 28 Aug, 2017 05:49 PM.