Menci / deploy-certificate-to-aliyun

GitHub Action to Deploy SSL certificate to Aliyun Certificates Service (and use in CDN).
13 stars 4 forks source link

ENAMETOOLONG: name too long #1

Closed brettwinters closed 1 year ago

brettwinters commented 1 year ago

Hi Menci

Thanks for publishing this action!

I've deployed the following workflow:

jobs:
  deploy-to-aliyun:
    name: Deploy certificate to Aliyun
    runs-on: ubuntu-latest
    steps:
      - # https://github.com/actions/checkout
        name: Checkout
        uses: actions/checkout@v3
        with:
          ref: ${{ github.ref }}

      - # https://github.com/marketplace/actions/deploy-ssl-certificate-to-aliyun
        name: Deploy
        uses: Menci/deploy-certificate-to-aliyun@beta-v1
        with:
          access-key-id: ${{ secrets.ALIYUN_CDN_ACCESSKEY_ID }}
          access-key-secret: ${{ secrets.ALIYUN_CDN_ACCESSKEY_SECRET }}
          fullchain-file: ${{ secrets.SSL_FULLCHAIN }}
          key-file: ${{ secrets.SSL_KEY }}
          certificate-name: My-SSL
          cdn-domains: |
            docs.mydomain.com
            www.mydomain.com

But I'm getting the following error:


Run Menci/deploy-certificate-to-aliyun@beta-v1
  with:
    access-key-id: ***
    access-key-secret: ***
    fullchain-file: ***

    key-file: ***
    certificate-name: My-SSL
    cdn-domains: docs.mydomain.com
  www.mydomain.com

yarn install v1.[2](https://github.com/brettwinters/Mercenta/actions/runs/3552674122/jobs/5967729844#step:3:2)2.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[[3](https://github.com/brettwinters/Mercenta/actions/runs/3552674122/jobs/5967729844#step:3:3)/[4](https://github.com/brettwinters/Mercenta/actions/runs/3552674122/jobs/5967729844#step:3:4)] Linking dependencies...
[4/4] Building fresh packages...
Done in 0.[8](https://github.com/brettwinters/Mercenta/actions/runs/3552674122/jobs/5967729844#step:3:8)8s.
Error: ENAMETOOLONG: name too long, open '***
...
***'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at deployCertificate (/home/runner/work/_actions/Menci/deploy-certificate-to-aliyun/beta-v1/index.js:99:24)
    at main (/home/runner/work/_actions/Menci/deploy-certificate-to-aliyun/beta-v1/index.js:136:9)
    at Object.<anonymous> (/home/runner/work/_actions/Menci/deploy-certificate-to-aliyun/beta-v1/index.js:141:1)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
Error: Error: ENAMETOOLONG: name too long, open '***'

The fullchain.cer file is 6KB if that's relevant

Menci commented 1 year ago

fullchain-file and key-file are filenames of PEM certificate file. NOT the PEM file content.