[GH-ISSUE #117] Longer secret string throws error #76

Closed
opened 2026-03-01 21:39:53 +03:00 by kerem · 0 comments
Owner

Originally created by @Steffen911 on GitHub (Mar 2, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/117

What happened:
I use an .actrc file to provide the target docker image and a secret that corresponds to an inlined maven settings.xml file.
Now, when I run act I get Error: accepts at most 1 arg(s), received 64.

My .actrc:

-P ubuntu-18.04=nektos/act-environments-ubuntu:18.04
-s SETTINGS_XML='<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>backend-s3-release-repo</id> <username><USERNAME></username> <password><PASSWORD></password> </server> <server> <id>backend-s3-snapshot-repo</id> <username><USERNAME></username> <password><PASSWORD></password> </server> </servers> </settings>'

I tried to assign the value with single quotes, double quotes (with escaping the inner quotes) and without any quotes add all. The error is always the same.

When I pass the secret via the environment everything works fine and change the .actrc file to

-P ubuntu-18.04=nektos/act-environments-ubuntu:18.04
-s SETTINGS_XML

everything works as expected.

What I expect to happen:
It should run the workflow with the given settings.xml as the secret.

Version/Platform:
act version 0.2.4
macOS 10.15.3
command: act
output: Error: accepts at most 1 arg(s), received 64

workflow:

name: PR Build
on: [pull_request]
jobs:
  build:
    name: Build and Run Tests
    runs-on: ubuntu-18.04
    steps:
      - name: Checkout Code
        uses: actions/checkout@v1
      - name: Build and Run Tests
        run: |
          echo $SETTINGS_XML > ./settings.xml
          mvn verify --settings ./settings.xml --batch-mode
        env:
          SETTINGS_XML: ${{ secrets.SETTINGS_XML }}
Originally created by @Steffen911 on GitHub (Mar 2, 2020). Original GitHub issue: https://github.com/nektos/act/issues/117 **What happened**: I use an `.actrc` file to provide the target docker image and a secret that corresponds to an inlined maven `settings.xml` file. Now, when I run `act` I get `Error: accepts at most 1 arg(s), received 64`. My `.actrc`: ``` -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -s SETTINGS_XML='<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>backend-s3-release-repo</id> <username><USERNAME></username> <password><PASSWORD></password> </server> <server> <id>backend-s3-snapshot-repo</id> <username><USERNAME></username> <password><PASSWORD></password> </server> </servers> </settings>' ``` I tried to assign the value with single quotes, double quotes (with escaping the inner quotes) and without any quotes add all. The error is always the same. When I pass the secret via the environment everything works fine and change the `.actrc` file to ``` -P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -s SETTINGS_XML ``` everything works as expected. **What I expect to happen**: It should run the workflow with the given settings.xml as the secret. **Version/Platform**: act version 0.2.4 macOS 10.15.3 command: `act` output: `Error: accepts at most 1 arg(s), received 64` workflow: ```yml name: PR Build on: [pull_request] jobs: build: name: Build and Run Tests runs-on: ubuntu-18.04 steps: - name: Checkout Code uses: actions/checkout@v1 - name: Build and Run Tests run: | echo $SETTINGS_XML > ./settings.xml mvn verify --settings ./settings.xml --batch-mode env: SETTINGS_XML: ${{ secrets.SETTINGS_XML }} ```
kerem closed this issue 2026-03-01 21:39:53 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#76
No description provided.