actions / setup-java

Set up your GitHub Actions workflow with a specific version of Java
MIT License
1.53k stars 734 forks source link

fix(auth): Update authentication logic in settings.xml, unit tests #603

Closed ParryQiu closed 7 months ago

ParryQiu commented 7 months ago

Description:

Enhanced the logic for reading authentication information in the settings.xml file to address an issue where attempts to configure a GitHub Action for fetching packages from a repository within the same organization resulted in authentication errors. Despite the correct configuration, the process failed with a 401 Unauthorized status during dependency download from GitHub's Maven package repository. The error was pinpointed to a non-resolvable parent POM due to authentication failure, with an incorrect 'parent.relativePath' exacerbating the issue.

To resolve this, I made significant updates to the logic within settings.xml for better handling of authentication information. Additionally, unit tests have been updated to reflect these changes and ensure robust verification.

The documentation and examples have also been revised to provide clearer guidance on configuring and utilizing this updated process successfully.

Related issue: https://github.com/actions/setup-java/issues/602

Check list: