working on a kotlin api that call some endpoints on gcp, when I use postman or terminal to call the endpoint I get the following error:
java.lang.IllegalStateException: java.io.IOException: Your default credentials were not found. To set up Application Default Credentials for your environment, see https://cloud.google.com/docs/authentication/external/set-up-adc.
things I did:
- I have tried following this document: https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev
- gcloud auth application-default login: Credentials saved to file […/.config/gcloud/application_default_credentials.json]
- used a service account.
note: this issue is happening on Mac, apparently on linux it is working fine