Repository navigation
Support nuget.config source credentials with env var expansion - #40
Conversation
|
Rather than inventing our own envvar resolution mechanism, couldn't we just implement https://learn.microsoft.com/en-us/nuget/consume-packages/consuming-packages-authenticated-feeds#credentials-in-environment-variables? |
|
Or perhaps as a primary mechanism, with %...% documented as a proprietary fallback (which I'm not too fond of since it would break compatibility with dnx, which is an explicit goal) |
Ok, I'll take a look. Btw, invented envvar expansion is just a Environment.ExpandEnvironmentVariables.
If I remember correctly, dnx (and dotnet nuget) resolve these %...% out of the box (that's why I picked them - in docker dotnet nuget expanded them). |
|
|
|
@kzu, done - added support for NuGetPackageSourceCredentials_{name} env vars; they take precedence over nuget.config credentials (just like nuget/dnx). P.S. For %...%: the doc mentions it "The username and plain text password in a nuget.config file can use an environment variable by adding % to the beginning and end of the environment variable name", so it's a documented feature. |
Adds support for
packageSourceCredentialsfrom nuget.config, so tools can be installed from private feeds.ClearTextPasswordis supported, not encryptedPassword(iirc, native dnx on linux and macos doesn't support it).