Skip to content

ADO Git Configured project with Git Sourced package script fails with 'Could not find package file' error using Linux Worker #9793

@Clare-Octopus

Description

@Clare-Octopus

Severity

Blocking customers from using Git Sourced scripts in steps if they have an ADO configured Git repo with spaces in the repo name.

Version

2026.1.2650

Latest Version

I could reproduce the problem in the latest build

What happened?

If I have an ADO Git repository with spaces in its name which is used to house my Octopus project in Git:

Image

And I try and source a script in a step from the same ADO Git repository running on a Linux worker, it will error out with:

Could not find package file:

Image

However, the same project setup configuration will work on the same Linux worker if I have the project stored in an ADO Git repository without spaces in its name:

Image

Image

This seems to happen with any step that uses a package you can pull from a Git repository (specifically ADO).

I tested this with a GitHub repository and that works fine with spaces in but GiHub changes the spaces to underscores:

Image Image

Reproduction

  1. Create an ADO Git repository with spaces in its name, make sure you initialise it.
  2. Ensure it has a basic bash script you can run in Linux in the repository.
  3. Create an Octopus Project, convert it to Git by using the ADO settings from the repository created in Step 1.
  4. Use any Octopus step from which you can source a script from Git (Run a Script will work for this setup).
  5. Source the script from the Project (so the Git repo) and ensure you are pointing to it in the step.
  6. Run it on an Ubuntu worker and ensure its got the right tools to execute a bash script.
  7. See the error occur.

Perform steps 1 though 6 again but this time for Step 1 create an ADO repository without a space in it. You will see the script file found and it will run it.

Error and Stacktrace

16:29:26   Error    |       Could not find package file: /home/Octopus/Files/https_dev.azure.com_Clare-Octopus_ADO2520Repository@O0.0.0.0.0ec26d1643f9b6f-da39a3e@e78177e.zip
16:29:26   Verbose  |       Process /bin/bash in /home/Octopus/Work/08de399b-9cc3-6df4-b2ae-8237f69c618f exited with code 1

More Information

Initial Customer Ticket (Internal) - https://octopuscd.zendesk.com/agent/tickets/181687
RnD (Internal) - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1765558509523349

Task log for ADO Ubuntu deployment with spaces in ADO repository (internal).
Task log for ADO Windows deployment with spaces in ADO repository (internal).

Task log for ADO Ubuntu deployment without spaces in ADO repository (internal).
Task log for ADO Ubuntu deployment with spaces in GitHub repository (internal).

Possibly similar to this open issue (though manifests slightly differently here).

Workaround

Use a Windows worker or create an ADO repository without spaces and move your Octopus Git Project to that repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugThis issue represents a verified problem we are committed to solving

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions