error NU1101: Unable to find package (from GitHub Package) #30746
-
Hi, I need to restore NuGet package from my Github Package repository. To do so, I added this step in my (reusable) workflow : - name: Add GitHub NuGet Source
run: |
dotnet nuget add source --username $OWNER --password $GITHUB_TOKEN --store-password-in-clear-text --name github "https://nuget.pkg.github.com/$OWNER/index.json"
dotnet nuget list source
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }} which seems to work as the log output :
But when I call
I checked that the package mentioned in the error exists and it is the case. Additional information :
Regards, Julien |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @elendil-software , This is probably because you are trying to fetch a NuGet package from another repository than the GitHub Actions is running. In the Github actions docs is noted that it is not possible to do this. Try to generate a PAT and the workflow will work as expected |
Beta Was this translation helpful? Give feedback.
Hi @elendil-software ,
This is probably because you are trying to fetch a NuGet package from another repository than the GitHub Actions is running. In the Github actions docs is noted that it is not possible to do this.
Try to generate a PAT and the workflow will work as expected