Windows agent (2.5.3): possible issue with metajob secret SSH key injection / path handling #2740
Thomas Pierrard opened 2 months ago

After upgrading to OneDev 15, my Windows agent appears unable to perform checkout over SSH when using a metajob secret. This might be related to how the SSH identity file is generated or how paths are handled on Windows.

Checkout step fails with:

Warning: Identity file C:onedev_agentagentworktemponedev-build-70-15719-2.sshid_rsa not accessible: No such file or directory.
Host key verification failed.
fatal: Could not read from remote repository.

The generated Git command seems to reference a valid Windows path:

ssh -i "C:\onedev_agent\agent\work\temp\...\id_rsa" ...

However, the warning shows a malformed path (missing backslashes):

C:onedev_agentagentworktemp...

Additional context:

  • We are using a metajob secret for SSH authentication
  • Linux agents are unaffected using the same configuration
  • The same pipeline works correctly on a Linux agent
  • Only the Windows agent (auto-updated to 2.5.3) is affected
  • It seems the agent cannot properly retrieve or use the SSH identity from the metajob secret

Important diagnostic detail:

Running the same operation manually on the Windows machine works:

git clone ssh://<repo>

Environment:

  • OneDev version: 15
  • Windows agent version: 2.5.3
  • Agent OS: Windows 11

Windows-specific path handling or escaping ?

An issue in how metajob secrets are written to temporary files on Windows agents?

Regards, Thomas

1/1
Type
Bug
Priority
Normal
Assignee
Affected Versions
Onedev 15
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2740
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover