I have a private package on Azure DevOps which I consume by an API project.
For that I have in this API project the following:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
<add key="mypack" value="https://pkgs.dev.azure.com/org/_packaging/mypack/nuget/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<mypack>
<add key="Username" value="EmailUserInDevOps" />
<add key="ClearTextPassword" value="TokenFromDevOps" />
</mypack>
</packageSourceCredentials>
</configuration>
It works fine on my development machine ...
But I also want to build the API project using DevOps.
For that I connect DevOps to a Github repository where the API project is.
But in this repository I do not have the Nuget.config file.
I don't have it there to not expose my Password to mypack feed.
How can I solve this?