GithubHelp home page GithubHelp logo

Comments (4)

MaximSungmo avatar MaximSungmo commented on May 11, 2024

What I do is

  1. make service account
  2. gen service account key
  3. set the github secret SA_EMAIL, GOOGLE_APPLICATION_CREDENTIALS, GCE_PROJECT

from setup-gcloud.

sethvargo avatar sethvargo commented on May 11, 2024

Hi @MaximSungmo

As the issue template instructs, please share your complete action.yml file.

from setup-gcloud.

MaximSungmo avatar MaximSungmo commented on May 11, 2024

@sethvargo
I did not base64 encode the .json file.

used GOOGLE_APPLICATION_CREDENTIALS raw data of private_key as value..

So, it is solved!

from setup-gcloud.

bibimorlet avatar bibimorlet commented on May 11, 2024

Hello everyone!

It doesn't work for me. I have the same error:

WARNING: .p12 service account keys are not recomended unless it is necessary for backwards compatability. Please switch to a newer .json service account key for this account.
ERROR: (gcloud.auth.activate-service-account) PyOpenSSL is not available. If you have already installed PyOpenSSL, you will need to enable site packages by setting the environment variable CLOUDSDK_PYTHON_SITEPACKAGES to 1. If that does not work, see https://developers.google.com/cloud/sdk/crypto for details or consider using .json private key instead.
##[error]The process '/opt/hostedtoolcache/gcloud/270.0.0/x64/bin/gcloud' failed with exit code 1

My workflow is:

jobs:
  setup-build-publish:
    if: github.event.pull_request.merged == true
    name: name
    runs-on: ubuntu-latest
    steps:

    - name: Checkout
      uses: actions/checkout@v1

    # Setup gcloud CLI
    - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
      with:
        version: '270.0.0'
        service_account_email: ${{ secrets.GCP_EMAIL }}
        service_account_key: ${{ secrets.GCP_KEY }}

I created a service account with its JSON key.
I created the secrets in github repository.
In GCP_EMAIL I have the "client_email" field of the JSON key file.
In GCP_KEY I have the "private_key" field of the JSON key file.

For example, the private_key is like:

"-----BEGIN PRIVATE KEY-----\nMYPRIVATEKEY\n-----END PRIVATE KEY-----"

Does anyone have a solution for me?
Thanks

from setup-gcloud.

Related Issues (20)

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.