Coder Social home page Coder Social logo

Comments (9)

sqdk avatar sqdk commented on July 22, 2024 1

Works exactly as expected!

Many, many thanks @fsouza

from gcs-helper.

fsouza avatar fsouza commented on July 22, 2024

Hey @sqdk, thanks for opening this issue. I wonder if there's something going on with that credentials file. Is it for a service account? Does gsutil work with that file?

export GOOGLE_APPLICATION_CREDENTIALS=/credentials.json
gsutil cp gs://my-bucket-name/test_report/index.html /tmp

from gcs-helper.

sqdk avatar sqdk commented on July 22, 2024

@fsouza sorry for the dupe!

The credentials is a service account, yes. And great idea to test locally.

I just checked that the credential file works with gsutil:

$ gcloud auth activate-service-account --key-file credentials.json
Activated service account credentials for: [OMITTED]
$ gsutil ls                                                       
gs://my-bucket-name/
$ gsutil cp gs://my-bucket-name/test_report/index.html .
Copying gs://my-bucket-name/test_report/index.html...
/ [1 files][ 97.3 KiB/ 97.3 KiB]                                                
Operation completed over 1 objects/97.3 KiB.

This leads me to believe that SOMETHING is confusing the library as to what auth method to use. It seems to look for something it shouldn't.

Do you usually run this in a container or a VM?

from gcs-helper.

sqdk avatar sqdk commented on July 22, 2024

To clarify, I am basically running the image on dockerhub except for a couple of lines that injects the credentials file.

from gcs-helper.

fsouza avatar fsouza commented on July 22, 2024

Yeah I just realized we've never ran this with a SA (we run it locally with user accounts and in GCE/GKE with roles), but we assumed it would work.

Let me give it a shot then I'll get back to you. Sorry about that.

from gcs-helper.

sqdk avatar sqdk commented on July 22, 2024

Well, good to know I am not going crazy!

Thanks for helping me out. Really appreciated!

from gcs-helper.

fsouza avatar fsouza commented on July 22, 2024

@sqdk it looks it's an issue with using a custom http client + service accounts, it would end-up with an empty scope ¯_(ツ)_/¯ I just pushed a fix that worked for me, can you confirm it works for you too?

I'll also make a follow up change improving the logging in the proxy method.

from gcs-helper.

sqdk avatar sqdk commented on July 22, 2024

@fsouza It all makes sense then! Thanks for the quick reply!

I got my test setup ready so I'll check it out right now.

from gcs-helper.

fsouza avatar fsouza commented on July 22, 2024

@sqdk thanks for confirming!

from gcs-helper.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.