gsutil tracker file permission denied

This issue has been tracked since 2022-09-14.

TL;DR

sometimes I get this issue when using gsutil cp

CommandException: Couldn't write tracker file (/home/runner/.gsutil/tracker-files/upload_TRACKER_cbee0bfed84040df3d6b0fc6ed8b7ef1c7aee640.js.map__JSON.url): Permission denied. This can happen if gsutil is configured to save tracker files to an unwritable directory)

Expected behavior

files getting uploaded to bucket

Observed behavior

getting permission issues

Action YAML

upload-to-bucket:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/[email protected]
    - uses: google-github-actions/[email protected]
      with:
        credentials_json: ${{ secrets.GITHUB_ACTIONS_JSON_KEY }}
    - name: 'Set up Cloud SDK'
      uses: 'google-github-actions/[email protected]'
    - name: install correct node version
      uses: actions/[email protected]
      with:
        node-version-file: '.nvmrc'
        cache: 'npm'
    - name: install npm modules with npm ci
      run: npm ci
    - name: build asset
      run: npm run build-ci
    - name: deploy
      run: |
        gsutil -m cp -z js /var/tmp/bundle.js* gs://$BUCKET_PATH/

Log output

Copying file:///var/tmp/bundle.js [Content-Type=application/javascript]...
Copying file:///var/tmp/bundle.js.LICENSE.txt [Content-Type=text/plain]...
Copying file:///var/tmp/bundle.js.map [Content-Type=application/octet-stream]...
Couldn't read upload tracker file (/home/runner/.gsutil/tracker-files/upload_TRACKER_cbee0bfed84040df3d6b0fc6ed8b7ef1c7aee640.js.map__JSON.url): Permission denied. Restarting upload from scratch.
CommandException: Couldn't write tracker file (/home/runner/.gsutil/tracker-files/upload_TRACKER_cbee0bfed84040df3d6b0fc6ed8b7ef1c7aee640.js.map__JSON.url): Permission denied. This can happen if gsutil is configured to save tracker files to an unwritable directory)
CommandException: 1 file/object could not be transferred.
/ [0/3 files][    0.0 B/ 31.4 MiB]   0% Done                                    
/ [0/3 files][    0.0 B/ 31.4 MiB]   0% Done                                    
/ [1/3 files][  7.4 KiB/ 31.4 MiB]   0% Done                                    
/ [1/3 files][  7.4 KiB/ 31.4 MiB]   0% Done                                    
/ [2/3 files][  1.9 MiB/ 31.4 MiB]   5% Done                                    
-
Error: Process completed with exit code 1.

Additional information

This issue does not persists. Sometimes re-run works. Sometimes one re-run is not enough.
It happens once in a while.

I have searched on how to change the tracking files destination , but have not found any leads.

More Details About Repo
Owner Name google-github-actions
Repo Name setup-gcloud
Full Name google-github-actions/setup-gcloud
Language TypeScript
Created Date 2019-11-05
Updated Date 2023-03-23
Star Count 1505
Watcher Count 65
Fork Count 548
Issue Count 11

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date