Issues when publish java maven lib to Github Package [Failed to deploy artifacts: 401 Unauthorized] #156444
-
|
Hi guys, Can anybody help me take a look at the issue when I publish java maven lib to Github Package? I tried over and over. The github token, I've granted all of access through [Personal access token (classic)], and added it to repository -> Settings ->[Actions secrets and variables] -> General ->[Repository secrets]. Is there anything I was missing? config files: Error: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Thank you very much @DinithSenarathna . Issue solved by introducing setting.xml file. |
Beta Was this translation helpful? Give feedback.
Hello Frank,
I understand you're encountering a 401 Unauthorized error when attempting to publish your Java Maven library to GitHub Packages. Let's walk through some common causes and solutions to this issue.
🔍 Understanding the Issue
The error message:
indicates that the authentication credentials provided are not being accepted by GitHub Packages during the deployment process.
✅ Steps to Resolve
Verify Personal Access Token (PAT) Permissions
Ensure that your PAT has the necessary scopes:
write:packagesread:packagesrepo(if your repository is private)You can check an…