Skip to content

[JENKINS-72979] Windows agent instructions in UI adds superfluous space in secret file #16403

@jenkins-infra-bot

Description

@jenkins-infra-bot

Jenkins Agent instructions in UI tells user to run:

echo XXXXXXXX > secret-file

(where XXXXXXXX is a secret)

This is fine under Linux, but a little bit wrong under Windows. The space between last character of a secret and > sign is actually added into secret-file. Thus agent authentication doesn't work if one tries to use that secret file.

For it to work under Windows the command should be:

echo XXXXXXXX> secret-file

Originally reported by vilius, imported from: Windows agent instructions in UI adds superfluous space in secret file
  • status: Closed
  • priority: Minor
  • component(s): core
  • label(s): 2.492.1-fixed
  • resolution: Fixed
  • resolved: 2024-10-16T13:23:57+00:00
  • votes: 0
  • watchers: 4
  • imported: 2025-11-24
Raw content of original issue

Jenkins Agent instructions in UI tells user to run:

echo XXXXXXXX > secret-file

(where XXXXXXXX is a secret)

This is fine under Linux, but a little bit wrong under Windows. The space between last character of a secret and > sign is actually added into secret-file. Thus agent authentication doesn't work if one tries to use that secret file.

For it to work under Windows the command should be:

echo XXXXXXXX> secret-file
  • environment: Windows Server Core 2019

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions