woodpecker-ci / plugin-s3

WoodpeckerCI plugin for publishing artifacts to Amazon S3 and compatible object storages
https://woodpecker-ci.org/plugins/S3%20Plugin
Apache License 2.0
5 stars 4 forks source link

problem with wildcard certificates #11

Closed cooperspencer closed 2 years ago

cooperspencer commented 2 years ago

I tried to run the following command:

docker run --rm \
  -e PLUGIN_SOURCE=target/mcMMO.jar \
  -e PLUGIN_TARGET=/mcmmo/mcMMO.jar \
  -e PLUGIN_BUCKET=artifacts \
  -e AWS_ACCESS_KEY_ID=xxx \
  -e AWS_SECRET_ACCESS_KEY=yyy \
  -e S3_ENDPOINT=https://storage.xxx.yyy \
  -v /home/andy/git/mcmmo_git:/home/andy/git/mcmmo_git \
  -w /home/andy/git/mcmmo_git \
  woodpeckerci/plugin-s3

and got this error message:

time="2021-10-20T11:25:14Z" level=error msg="Could not upload file" bucket=artifacts error="RequestError: send request failed\ncaused by: Put \"https://artifacts.storage.xxx.yyy/mcmmo/mcMMO.jar/mcMMO.jar\": x509: certificate is valid for *.xxx.yyy, not artifacts.storage.xxx.yyy" name=mcMMO.jar target=/mcmmo/mcMMO.jar/mcMMO.jar
time="2021-10-20T11:25:14Z" level=fatal msg="RequestError: send request failed\ncaused by: Put \"https://artifacts.storage.xxx.yyy/mcmmo/mcMMO.jar/mcMMO.jar\": x509: certificate is valid for *.xxx.yyy, not artifacts.storage.xxx.yyy"

It seems like there's a problem with the wildcard certificate. The certificate comes from letsencrypt. The endpoint is a minio instance behind an Nginx with reverse proxy.

cooperspencer commented 2 years ago

I added PLUGIN_PATH_STYLE=true to my command and now it works fine