In this step we configure the workstation to allow the developer to access GitHub hosted Nuget packages.
We use a Nuget.Config in the users folder to provide our repository/package access credentials to the LazyMagicOrg Nuget Package registry. LazyMagicOrg packages are used in our sample system.
You will need to provide your github username and a Personal Access Token to access the LazyMagicOrg package repository. To generate a PAT, login to github and navigate to https://github.com/settings/apps.
It is recommended that you keep the scope of access assigned to the PAT as limited as possible. Usually just read:packages.
Navigate to your User folder and create a Nuget.Config file with the following content, replacing the ghp_xxx string with your PAT, and the meongithub with your github handle.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="LazyMagic"
value = "https://nuget.pkg.github.com/LazyMagicOrg/index.json" />
</packageSources>
<packageSourceCredentials>
<LazyMagic>
<add key="Username" value="meongithub" />
<add key="ClearTextPassword" value="ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
</LazyMagic>
</packageSourceCredentials>
</configuration>