Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with creating new bucket Space in digitalocean using s3cmd action #12

Open
MozeBaltyk opened this issue Mar 4, 2024 · 2 comments

Comments

@MozeBaltyk
Copy link

MozeBaltyk commented Mar 4, 2024

Get this error when using this action for digitalocean:

name: Stage deployment

on:
  workflow_dispatch:

env:
  DO_PAT: ${{secrets.DIGITALOCEAN_ACCESS_TOKEN}}
  S3_ACCESS_KEY_ID: ${{secrets.DIGITALOCEAN_SPACES_ACCESS_TOKEN}}
  S3_SECRET_ACCESS_KEY: ${{secrets.DIGITALOCEAN_SPACES_SECRET_KEY}}

jobs:
  backend:
    name: Backend
    runs-on: ubuntu-latest

    steps:
      - name: Set up S3cmd cli tool
        uses: s3-actions/s3cmd@main
        with:
          provider: digitalocean
          region: FRA1
          access_key: ${{secrets.DIGITALOCEAN_SPACES_ACCESS_TOKEN}}
          secret_key: ${{secrets.DIGITALOCEAN_SPACES_SECRET_KEY}}

      - name: Interact with object storage
        run: |
          buck="github-action-${{ github.run_id }}"
          mkdir example
          s3cmd mb s3://$buck
          echo 'foo' >> example/bar
          s3cmd put example/bar s3://$buck
          mkdir -p example/baz/bar
          echo 'fizz' >> example/baz/bar/faz
          sleep 10
          s3cmd sync --recursive --acl-public example s3://$buck
          #sleep 10
          #s3cmd rm -r --force s3://$buck
          #sleep 10
          #s3cmd rb s3://$buck
ERROR: S3 error: 400 (XAmzContentSHA256Mismatch)
Error: Process completed with exit code 11.

I also manage to reproduce the error manually :
https://www.digitalocean.com/community/questions/s3cmd-signaturedoesnotmatch

also one more interesting point is that if the bucket already exist, then I can interact with it. It´s only the creation which is problematic.

@MozeBaltyk
Copy link
Author

Solution by adding to the s3cfg file: signature_v2 = True

But action here does not allow for further configuration.

@bluebrown
Copy link
Contributor

@MozeBaltyk , sorry for the late reply. You could open a pr or change this in your workflow via flag other manipulating the file by other means.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants