Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

when I deploy a project that contains a maven dependency of GitHub Packages. I get 401. #432

Copy link
Copy link
@yaoqiangpersonal

Description

@yaoqiangpersonal
Issue body actions

Description:
I push a maven project to GitHub packages. I use default settings.xml. but it doesn't work. I have to add the GitHub profile to setting.xml and activate it. then it works well.

Task version:
actions/setup-java@v3

Platform:
Ubuntu

Repro steps:
Error: Non-resolvable import POM: Could not transfer artifact xxx from/to bom (https://maven.pkg.github.com/xxx/*): authentication failed for xxxxx, status: 401 Unauthorized @ line 56, column 16

Expected behavior:
I don't need to set settings. xml for each project

Actual behavior:
I have to set a custom settings.xml like this:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
		  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
	<servers>
		<server>
			<id>github</id>
			<username>${env.GITHUB_ACTOR}</username>
			<password>${env.GITHUB_TOKEN}</password>
		</server>
		<server>
			<id>gpg.passphrase</id>
			<passphrase>${env.GPG_PASSPHRASE}</passphrase>
		</server>
	</servers>
	<profiles>
		<profile>
			<id>github</id>
			<repositories>
				<repository>
					<id>github</id>
					<name>GitHub Apache Maven Packages</name>
					<url>https://maven.pkg.github.com/xxxxx/*</url>
				</repository>
			</repositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>github</activeProfile>
	</activeProfiles>
</settings>
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.