DNU Restore does not work with custom protected nuget feeds in VSTS Build
I'm trying to use VSTS package management with a protected feed in a core1 app deployment scenario. Default feeds are fine, and the build is otherwise working fine.
I cannot seem to get dnu restore to work with the build agents against this protected feed. The dnu restore command has a -s option for sources, but there is not any documented way to pass in a credential (I hope I just missed something).
Basic HTTP auth does not work either.
I also tried to push a custom nuget.config to the agent's appdata folder. Dnu restore does pick up the file, but we get an error:
System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.
at System.Security.Cryptography.ProtectedData.Unprotect(Byte[] encryptedData, Byte[] optionalEntropy, DataProtectionScope scope)
at NuGet.EncryptionUtility.DecryptString(String encryptedString)
at NuGet.PackageSourceProvider.ReadCredential(String sourceName)
at NuGet.PackageSourceProvider.<>c__DisplayClass13_0.2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)
at NuGet.PackageSourceProvider.LoadPackageSources()
at Microsoft.Dnx.Tooling.PackageSourceUtils.GetEffectivePackageSources(IPackageSourceProvider sourceProvider, IEnumerable1 sources, IEnumerable1 fallbackSources)
at Microsoft.Dnx.Tooling.RestoreCommand.d__68.MoveNext()
Restore failed Key not valid for use in specified state. NuGet Config files used: C:\Windows\ServiceProfiles\NetworkService\AppData\Roaming\NuGet\nuget.config
Any ideas? I've looked for ways to decrypt the long password VSTS provided, but no luck there either.