Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

Provide the possibility to work with few buckets from different Google Cloud projects #72

Open
mbarouski opened this issue Nov 12, 2019 · 1 comment

Comments

@mbarouski
Copy link

Provide the possibility to work with few buckets from different Google Cloud projects.

E.g.:
I have project A which has dependencies B and C.
B is deployed to b-packages bucket of b-project.
C is deployed to c-packages bucket of c-project.
I have a service account which has necessary rights in both projects but some package is not available:

Caused by: com.vorstella.shade.com.google.api.client.googleapis.json.GoogleJsonResponseException: 404 Not Found
{
  "code" : 404,
  "errors" : [ {
    "domain" : "global",
    "message" : "Not Found",
    "reason" : "notFound"
  } ],
  "message" : "Not Found"
}
    at com.vorstella.shade.com.google.api.client.googleapis.json.GoogleJsonResponseException.from (GoogleJsonResponseException.java:146)
    at com.vorstella.shade.com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError (AbstractGoogleJsonClientRequest.java:113)
    at com.vorstella.shade.com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError (AbstractGoogleJsonClientRequest.java:40)
    at com.vorstella.shade.com.google.api.client.googleapis.services.AbstractGoogleClientRequest$1.interceptResponse (AbstractGoogleClientRequest.java:321)
    at com.vorstella.shade.com.google.api.client.http.HttpRequest.execute (HttpRequest.java:1065)
    at com.vorstella.shade.com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed (AbstractGoogleClientRequest.java:419)
    at com.vorstella.shade.com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed (AbstractGoogleClientRequest.java:352)
    at com.vorstella.shade.com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute (AbstractGoogleClientRequest.java:469)
    at com.vorstella.shade.com.google.cloud.storage.spi.v1.HttpStorageRpc.list (HttpStorageRpc.java:336)
    at com.vorstella.shade.com.google.cloud.storage.StorageImpl$8.call (StorageImpl.java:299)
    at com.vorstella.shade.com.google.cloud.storage.StorageImpl$8.call (StorageImpl.java:296)
    at com.vorstella.shade.com.google.api.gax.retrying.DirectRetryingExecutor.submit (DirectRetryingExecutor.java:89)
    at com.vorstella.shade.com.google.cloud.RetryHelper.run (RetryHelper.java:74)
    at com.vorstella.shade.com.google.cloud.RetryHelper.runWithRetries (RetryHelper.java:51)
    at com.vorstella.shade.com.google.cloud.storage.StorageImpl.listBlobs (StorageImpl.java:295)
    at com.vorstella.shade.com.google.cloud.storage.StorageImpl.list (StorageImpl.java:262)
    at com.gkatzioura.maven.cloud.gcs.GoogleStorageRepository.connect (GoogleStorageRepository.java:55)

I suppose it means that it finds b-package in a-project and can't find it.

@mbarouski
Copy link
Author

mbarouski commented Nov 12, 2019

Strange that it works when I log in to my personal account via gcloud auth application-default login command but doesn't work with service account on CI with command export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/gcloud-service-key.json && mvn dependency:go-offline.

UPD.: Tried to activate service account via gcloud auth activate-service-account --key-file KEY_FILE_PATH on CI and locally and it doesn't work as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant