Skip to content

gsutil isn't authenticated #404

@pvanderlinden

Description

@pvanderlinden

TL;DR

gsutil isn't authenticated even though the docs mention it is possible

Expected behavior

gsutil is authenticated

Observed behavior

I get the error "401 Anonymous caller does not have storage.objects.list access to the Google Cloud Storage bucket."

Action YAML

name: Docs build & upload

on:
  push:
    branches:
      - main

env:
  GCS_DEST: gs://...

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.11"]
    steps:
      - uses: actions/checkout@v4
      - name: "google cloud auth"
        uses: "google-github-actions/auth@v2"
        with:
          credentials_json: "${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}"
      - name: publish
        if: ${{ github.ref == 'refs/heads/main' }}
        run: |
          gsutil -m rsync -x 'compiled/.*$|.*\.msgpack$' -R -r target  ${{ env.GCS_DEST }}

Log output

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions