it:ad:nuget:howto:persist_settings_in_nuget_s_config.xml_file

IT:AD:Nuget:HowTo:Persist Settings in Nuget's Config.xml file

Summary

The file is located in:

The contents, once you've invoked nuget setAPIKey xxx are saved to a config file that I found here:

C:\Users\Administrator\AppData\Roaming\NuGet\Nuget.config

The contents look like:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <apikeys>
    <add key="https://www.nuget.org" value="AQAAANCM3d8BFdERjHoAwE/Cl+sBAAAA9qsLreUlMEeEEs8G7tN/+wAAAAACAAAAAAAQZgAAAAEAACAAAACPT1WFIFCaoizR5/l4dqP0W+iJW+AQON40l/rYdY3SRgAAAAAOgAAAAAIAACAAAABuzfa/fWlZSC52YdpzHQD26VDLn49xskP06uYDglIyVzAAAADfjxKa6nXlVF/M081g145kzhmbOvX1tVY7wLPnqPOYAH5DQU8S6fEBvmZHhmlYIyBAAAAAr19NQZc9teGd6pu9jYuUb68Rz0y7sFBgIpZnUk1QVUdnnjqKX97eHctmsZjJMPBgIg/u3Dcc+XzhV4MS1NElIA==" />
    <add key="http://nuget.gw.symbolsource.org/Public/NuGet" value="AQAAANCMne8BFdERjHoAwE/Cl+sBAAAA9qsLreUlMEeEEs8G7tN/+wAAAAACAAAAAAAQZgAAAAEAACAAAADJ0Bsfd3xdJ3Sw1B8HjWQXMf4/EBtxbfsTFbgFbqtquQAAAAAOgAAAAAIAACAAAAB+Hvdohrn6T272CL6ZaKZj8Uu3qafFENloje+v77P7UDAAAAAyhsUu3zAOA/Wlg+GXO8yJi95bn9KnA70RM9otn6BxuyF1izlYJL+sV3hAszeFCrFAAAAAkKNF3GEgEj9ww9Vp4Jn8bp2hswPCF/mVwYK0MVxEImvBnzRy2Zb54QHPlx0EuHdCH76jsihw6maMVzzGE9PWxA==" />
  </apikeys>
</configuration>

WARNING: But note that this is in the %userprofile% of the logged in user…not the Service Account/ of the CI/. For that, you may need to know: set for services

For example, as IT:AD:Jenkins is 32 bit, the file will be persisted in C:\Windows\SysWOW64\config\systemprofile\AppData\Roaming\NuGet

You can persist other values like this:

nuget config -Set name=value

and later retrieved by removing the -Set option, and just using the key name:

nuget config name

  • /home/skysigal/public_html/data/pages/it/ad/nuget/howto/persist_settings_in_nuget_s_config.xml_file.txt
  • Last modified: 2023/11/04 01:51
  • by 127.0.0.1