First I add my package source (test).
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="test" value="https://mytestpackagesource" />
</packageSources>
</configuration>
When I run dotnet restore
I get a 401 (Unauthorized), which is expected. So I add credentials.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="test" value="https://mytestpackagesource" />
</packageSources>
<packageSourceCredentials>
<test>
<add key="Username" value="apparently this can be anything when you use a token?" />
<add key="ClearTextPassword" value="my personal access token" />
</test>
</packageSourceCredentials>
</configuration>
And this works. But if I change the token to something invalid or even remove the packageSourceCredentials
element completely it still works, which makes me believe my token got stored somewhere else. So my question is where did it get stored and how do I update it?