0

我已手动将 Maven 依赖项上传到我的工件存储库

从我的本地 PC中,“mvn install”从工件存储库正确下载每个 maven 依赖项,包括我手动上传的依赖项。


mvn -U 全新安装 -DskipTests=true

[INFO] 正在扫描项目...

[信息]

[INFO] -----------------< com.healthcentrix.prevvy:frontend >------

[INFO] 构建前端 2.1-SNAPSHOT

[信息] --------------------------------[ 罐子 ]------------ ---------------------

从 cloud-artifacts 下载:artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.pom 从 cloud-artifacts 下载:artifactregistry ://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.pom(401 B,90 B/s)

从 cloud-artifacts 下载:artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.jar 从 cloud-artifacts 下载:artifactregistry ://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.jar(521 kB,376 kB/s)


在 Cloud Build 或 cloud-build-local中,我们收到了权限错误


[ERROR] Failed to execute goal on project frontend: Could not resolve dependencies for project com.healthcentrix.prevvy:frontend:jar:2.1-SNAPSHOT:

无法在 org.moxieapps.gwt:highcharts:jar:1.7.2 收集依赖项:无法读取 org.moxieapps.gwt:highcharts:jar:1.7.2 的工件描述符:无法传输工件 org.moxieapps.gwt:highcharts :pom:1.7.2 from/to cloud-artifacts (artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts):远程存储库的权限被拒绝(或者它可能不存在)。该请求没有凭据,因为环境中没有可用的凭据。确保 1) 您已登录 gcloud 或 2) 已设置应用程序默认凭据(请参阅https://developers.google.com/accounts/docs/application-default-credentials了解更多信息)。403 Forbidden Step #0: [builder] [ERROR] {"error":"Permission "artifactregistry.repositories.downloadArtifacts" 在资源 "projects/prevvy1/locations/us-central1/repositories/artifacts" 上被拒绝(或者它可能不存在)"}


我们的 Cloud build Project 服务帐户拥有每个 Artifact Registry 权限,并且正在下载除此特定工件之外的其余依赖项,该工件是手动上传的

有必要给这个特定的工件一些特定的权限吗?如何?

提前感谢您的任何指导问候

4

0 回答 0