Closed mdmoura closed 2 months ago
Hello @mdmoura Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
Hello @mdmoura 👋, Thank you for the detailed description and reproduction steps:) I've attempted to replicate the behaviour you've detailed using both a Personal Access Token (PAT) and secrets.GITHUB_TOKEN. In both instances, I was able to successfully publish the package.
and also the packages are being visible in the repository packages section
Please review the GitHub documentation on Viewing and managing your packages and also ensure your tokens have the requisite permissions for push operations, including account-specific permissions.
If the issue remains unresolved, kindly provide a minimal reproduction repository link for further investigation. Thanks:)
Hello @mdmoura 👋, Just checking in to see if you had a chance to review the documentation and verify your token permissions as per my previous comment. If you're still experiencing issues, please share a minimal reproduction repository link which would be really helpful for further investigation. Your response is greatly appreciated. Thank you!
Hello @mdmoura 👋, Just checking in to see if you had a chance to review the documentation and verify your token permissions as per my previous comment. If you're still experiencing issues, please share a minimal reproduction repository link which would be really helpful for further investigation. Your response is greatly appreciated. Thank you!
@priya-kinthali Sorry for the delay of my answer! Didn't have time yet to check but I will do it by the end of next week and post here. Thank you.
Hello @mdmoura! Just giving you a gentle ping to see if there are any updates on your end regarding this issue? Thank you!
Hello @mdmoura , Just a gentle reminder!
Hello @mdmoura , Due to inactivity, I'm going to close this issue for now. Please feel free to reopen this issue or create a new one if necessary. Thank you!
@priya-kinthali Really sorry for the delayed answer but I was working in a project and couldn't find the time.
So I got back to this yesterday and after a while I found out what was happening ...
In the beginning the workflow might had a few errors related to token and dotnet commands. But after some fixes the problem was not with the Token configuration but with versioning.
So the workflow was trying to create a package with a version that already existed. But the error provided by Github Actions is misleading:
Pushing MyPackage.8.0.0.nupkg to 'https://nuget.pkg.github.com/xyx'...
PUT https://nuget.pkg.github.com/xyz/
warn : Your request could not be authenticated by the GitHub Packages service. Please ensure your access token is valid and has the appropriate scopes configured.
Forbidden https://nuget.pkg.github.com/xyz/ 135ms
error: Response status code does not indicate success: 403 (Forbidden).
It would be nice that Github would provide more information in the error message.
Hello @mdmoura 👋,
Thank you for the update:)
Please note that the warning message is related to GitHub Packages and not specifically to the actions/setup-dotnet
repository.
Description:
When pushing packages to GitHub Packages using Github Actions I get two behaviours:
When using a Personal Access Token (PAT) in
dotnet push
the package is pushed to the Github account. However it does not show on the Repository Packages ... Only in the Github Account packages tab.When using
secrets.GITHUB_TOKEN
indotnet push
I get an unauthorised error. I tried a few code variations based on research I did on various issues but the error persists.Note: I don't have a
nuget.config
inn the project's root or anywhere else.Task version: 8.0.4
Platform:
Runner type:
Repro steps:
Expected behavior:
The packages should be pushed to the repository packages. If possible using
secrets.GITHUB_TOKEN
instead of a Personal Access Token.Actual behavior:
When using a Personal Access Token (PAT) in
dotnet push
the package is pushed to the Github account. However it does not show on the Repository Packages ... Only in the Github Account packages tab.When using
secrets.GITHUB_TOKEN
indotnet push
I get an unauthorised error:I tried a few code variations based on research I did on various issues but the error persists.
Version 1
Version 2