I am assisting one of our developers with a TFS project. I installed the Octopus extension in their project collection. What I noticed is that unlike our other collections, only version 4.* is available for the Octopus package step (normally, we can use 1-4). As a result, we received this error:
Attempting to contact https://g.octopushq.com to find Octopus CLI tool version latest
Error: connect ECONNREFUSED xxxxxxxxxxx:443 Error: Unable to locate and download the latest Octopus CLI tool. To use the embedded copy or another specific version, add the Octopus CLI installer task to the build pipeline before this task.
I then added the “Use Octopus CLI tool version” step. See below screen:
Now when using this step, I received the below error:
Forcing the use of the embedded Octopus CLI tool.
Using the embedded Octopus CLI tool (version 7.4.1).
Checking local tool cache
Attempting to download the Octopus CLI tool
Caching tool: octo 7.4.1 x64 Error: Failed to download Octopus CLI tool version 7.4.1. Error: Unable to create directory ‘E:\agent\XXXX_work_tool\dotnet\octo\7.4.1\x64’. EPERM: operation not permitted, mkdir 'E:\agent\XXXX_work_tool\dotnet\octo’
Then I manually created that directory, downloaded the 7.4.1 CLI zip from your site, and unzipped it in the directory. When running the build again, I received the below error:
Forcing the use of the embedded Octopus CLI tool.
Using the embedded Octopus CLI tool (version 7.4.1).
Checking local tool cache
Attempting to download the Octopus CLI tool
Caching tool: octo 7.4.1 x64
… Error: Failed to download Octopus CLI tool version 7.4.1. Error: Failed rmRF: rm: could not remove file (code EPERM): E:\agent\XXXX_work_tool\dotnet\octo\7.4.1\x64/octo.exe
rm: could not remove file (code EPERM): E:\agent\XXXX_work_tool\dotnet\octo\7.4.1\x64/octo.pdb
rm: could not remove directory (code EPERM): E:\agent\XXXX_work_tool\dotnet\octo\7.4.1\x64
Can you assist in recommending the best way to locally install the CLI tool on the build server, so this CLI step in TFS works?
The latter errors seem to be related to a permissions issue. Does the service account that runs the TFS agent have permissions to make changes to that folder?
The way the octopus steps work with the plugin is that they will attempt to download the latest version of CLI on every step. If you use the Installer tool like you have selected, you will need to go to the agent and define the location of the octo.exe so it knows where to look for it. You will need to edit the Agent’s capabilities to tell it where the file is.
Please let me know if this is helpful or if you need more information.
Found tool in cache: octo 7.4.1 x64 Looking for E:\agent\XXXX_work_tool\octo\7.4.1\x64*octo.dll,E:\agent\XXXX_work_tool\octo\7.4.1\x64*Octo.dll Prepending PATH environment variable with directory: E:\agent\GIEQ2018_work_tool\octo\7.4.1\x64
But the Octopus Package step fails. It DOES package the zip file successfully…
Packing TVRAP version “20200804.11”… Saving “TVRAP.20200804.11.zip” to “E:\agent\XXXX_work\56\a”… Adding files from “E:\agent\XXXX_work\56\s \TVRAP\Master” matching pattern “**”
But it fails with the below error:
Error: The process ‘E:\agent\XXXX_work_tool\octo\7.4.1\x64\octo.cmd’ failed with exit code 4294967293
Failed to execute octo pack command. The process ‘E:\agent\XXXX_work_tool\octo\7.4.1\x64\octo.cmd’ failed with exit code 4294967293
I’ve seen this error in other Octopus threads on a quick search, but I didn’t see an answer.