I have repo A and repo B that are part of the same organization on GitHub. Both repositories are private. I published two NuGet packages to repo A and one package to repo B.
repo A can install its own packages without a problem, but it does not have access to repo B's package. I'm getting the following error when I run dotnet build
:
error NU1101: Unable to find package {{PackageId}}. No packages existwith this id in source(s): github. PackageSourceMapping is enabled,the following source(s) were not considered:/usr/local/share/dotnet/library-packs, nuget.org.
My nuget.config
file looks like this:
<?xml version="1.0" encoding="utf-8"?><configuration><packageSources><clear /><add key="nuget.org" value="https://api.nuget.org/v3/index.json" /><add key="github" value="https://nuget.pkg.github.com/{{orgname}}/index.json" /></packageSources><packageSourceCredentials><github><add key="Username" value="{{USERNAME}}" /><add key="ClearTextPassword" value="{{TOKEN}}" /></github></packageSourceCredentials><packageSourceMapping><packageSource key="github"><package pattern="{{OrgName}}.*" /></packageSource><packageSource key="nuget.org"><package pattern="*" /></packageSource></packageSourceMapping></configuration>
PAT has repo
and write:packages
permissions with no expiration. How can repo A access packages pushed under repo B?