0
votes

I created a gitlab-ci for my project.

When I run the pipeline, I face this error:

[FATAL] Non-resolvable parent POM for [projectName]-parent:0.0.1-SNAPSHOT: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.4.0 from/to [serverName]: Authentication failed for [serverName]/org/springframework/boot/spring-boot-starter-parent/2.4.0/spring-boot-starter-parent-2.4.0.pom 401 Unauthorized and 'parent.relativePath' points at no local POM @ line 6, column 13

The sixth line for my pom file starts at:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.4.0</version>
    <relativePath/> 
 </parent>

how can I solve this error?

1

1 Answers

0
votes

I think that the cause of your problem is this:

401 Unauthorized

Apparently Maven is attempting to retrieve org.springframework.boot:spring-boot-starter-parent:pom:2.4.0 from (I guess) "serverName", and "serveName" is saying "You are not authorized to do that!"

Now if Maven was talking directly to Maven Central to fetch the artifact, that wouldn't happen. No authorization is required by Maven Central itself.

But it is happening:

  • One possibility is that you are trying to fetch artifacts from a different Maven repository. Possibly it is a repo run by your organization?

  • Another possibility is that Maven's requests to fetch artifacts from some external repo are being blocked by a firewall on your machine, or on your corporate network.


How can I solve this error?

I don't think we can advise on that without more information from you.