Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

GCLOUD Artifact Registry: Permissions error downloading maven dependency uploaded manually with Cloud Build

I have uploaded manually an maven dependency to my artifact repository

From my local PC, "mvn install" download correctly every maven dependency from the artifact repository, included my manually uploaded dependency.


mvn -U clean install -DskipTests=true

[INFO] Scanning for projects...

[INFO]

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

[INFO] Building frontend 2.1-SNAPSHOT

[INFO] --------------------------------[ jar ]---------------------------------

Downloading from cloud-artifacts: artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.pom Downloaded from cloud-artifacts: artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.pom (401 B at 90 B/s)

Downloading from cloud-artifacts: artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.jar Downloaded from cloud-artifacts: artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts/org/moxieapps/gwt/highcharts/1.7.2/highcharts-1.7.2.jar (521 kB at 376 kB/s)


From Cloud Build or cloud-build-local, we got an permission error


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

Failed to collect dependencies at org.moxieapps.gwt:highcharts:jar:1.7.2: Failed to read artifact descriptor for org.moxieapps.gwt:highcharts:jar:1.7.2: Could not transfer artifact org.moxieapps.gwt:highcharts:pom:1.7.2 from/to cloud-artifacts (artifactregistry://us-central1-maven.pkg.dev/prevvy1/artifacts): Permission denied on remote repository (or it may not exist). The request had no credentials because none were available from the environment. Ensure that either 1) You are logged into gcloud or 2) Application default credentials are setup (see https://developers.google.com/accounts/docs/application-default-credentials for more information). 403 Forbidden Step #0: [builder] [ERROR] {"error":"Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "projects/prevvy1/locations/us-central1/repositories/artifacts" (or it may not exist)"}


Our Cloud build Project service account has every Artifact Registry permission, and is downloading the rest of depedencies excluding this specific artifact, which was uploaded manually

is necessary to give some specific permissions to this specific artifact? how?

Thanks in advance for any guidance Regards

question from:https://stackoverflow.com/questions/65891231/gcloud-artifact-registry-permissions-error-downloading-maven-dependency-uploade

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...