Skip to content

nextflow secrets set does not work with values starting with -- #6071

@long-matt-r

Description

@long-matt-r

Bug report

(Please follow this template by replacing the text between parentheses with the requested information)

Expected behavior and actual behavior

I would like to set a secret to the contents of a private key file for use with key-pair database authentication; however, I am unable to set the secret due to the private key file starting with '------BEGIN PRIVATE KEY-----' which is parsed as an argument no matter what I try.

I have tried:

  • passing -- as a previous argument (Unknown option: -- -- Check the available commands and options and syntax with 'help'))
  • preceding it with a '\' (gets included in the secret)
  • passing the contents directly with single quotes (Unknown option: -----BEGIN PRIVATE KEY-----)
  • other things

Having said that, if I edit the secrets store.json it works fine, so it's not a critical issue. Just would be nice if I didn't have to.

Steps to reproduce the problem

nextflow secrets set SNOWFLAKE_PRIVATE_KEY_RAW '-----BEGIN PRIVATE KEY-----'

Program output

Unknown option: -----BEGIN PRIVATE KEY----- -- Check the available commands and options and syntax with 'help'

(Copy and paste the output produced by the failing execution. Please highlight it as a code block. Whenever possible upload the .nextflow.log file.)

Environment

  • Nextflow version: 25.04.1.5946
  • Java version: openjdk 23.0.2 2025-01-21
  • Operating system: macOS
  • Bash version: zsh 5.9 (arm64-apple-darwin24.0)

Additional context

(Add any other context about the problem here)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions