Q: NuGet uses different config files I have a problem regarding the used nuget.config.
If i start a nuget restore via command line nuget uses
C:\Users\[USERNAME]\AppData\Roaming\NuGet\nuget.config

If the nuget restore is triggered via a jenkins build job it uses
C:\Windows\System32\config\systemprofile\AppData\Roaming\NuGet\nuget.config

Can somebody tell me where nuget stores the information which config is uses?

A: NuGet resolves the configs each time it runs. 
It's going to AppDataRoaming for the user, C:\Program Files (x86)\NuGet\Config, and it will try walking up the configs up the chain from the location of the project being restored. 
You're likely running as an admin in the above CI case.
Namely, if your folder structure is such:
F:\CoolApp\CoolProject\CoolProject.csproj
F:\CoolApp\CoolProject\NuGet.Config
F:\CoolApp\NuGet.Config

You could end up with the following configs, loaded in priority order:
F:\CoolApp\CoolProject\NuGet.Config
F:\CoolApp\NuGet.Config
C:\Users\[USERNAME]\AppData\Roaming\NuGet\nuget.config
C:\Program Files (x86)\NuGet\Config

The correct approach here would be to specify your config when building restoring. 
