Skip to content

Copying the 'Clone' URL of an ADO configured Git Project to use in Octopus version control settings results in 'Unexpected file format' error when sourcing a package from that Git Repository. #9843

@Clare-Octopus

Description

@Clare-Octopus

Severity

Blocking customers from using Git Sourced scripts in steps if they use the Clone URL of an ADO project in Octopus version control.

Version

2026.1.4995

Latest Version

I could reproduce the problem in the latest build

What happened?

If I have an ADO project and copy its URL from the Clone button in ADO it will put a <username>@ at the beginning of the URL:

Image

Image

If I use that in Octopus Version control it will validate fine and will allow me to generate the OCl files for that project:

Image

However, if I then try and source a script in a step from the same ADO Git repository, it will error out with:

System.Exception: Unexpected file format in https_<username>@dev.azure.com_<username>_DevOps-Utilities__git_DevOps-Utilities@O0.0.0.0.9fea1beb0bc070e-da39a3e@54630b9.zip. 

Error       Expected Octopus cached file format: `<PackageId>@<Version>@<CacheBuster>.<Extension>` or `<PackageId>.<SemverVersion>.<Extension>:


If I remove the <username>@ from the beginning of the URL it will then source the Git script fine.
(Non-working URL in red and working URL in green):

Image


I have tested the non-working repo URL project with a Windows worker and an Ubuntu worker and neither work, both produce the same error.

Reproduction

  1. Create an ADO Git repository with any name, make sure you initialise it.
  2. Ensure it has a basic powershell script you can run in the repository.
  3. Create an Octopus Project, convert it to Git by using the ADO settings from the repository created in Step 1 (ensure you copy the exact Clone URL of the repo from ADO).
  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 any worker or deployment target.
  7. See the error occur
  8. Go back to the version control settings for that project and remve the <username>@ from the ADO URL.
  9. Go back to the failed release deployment and re-run it - see it now work.

Error and Stacktrace

System.Exception: Unexpected file format in https_Clare-Octopus@dev.azure.com_Clare-Octopus_DevOps-Utilities__git_DevOps-Utilities@O0.0.0.0.9fea1beb0bc070e-da39a3e@54630b9.zip. 
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       Expected Octopus cached file format: `<PackageId>@<Version>@<CacheBuster>.<Extension>` or `<PackageId>.<SemverVersion>.<Extension>`
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Common.Features.Packages.PackageName.FromFile(String path) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\Features\Packages\PackageName.cs:line 172
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Common.Features.Packages.CombinedPackageExtractor.GetExtractor(String packageFile) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\Features\Packages\CombinedPackageExtractor.cs:line 51
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Common.Features.Packages.CombinedPackageExtractor.Extract(String packageFile, String directory) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\Features\Packages\CombinedPackageExtractor.cs:line 42
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.Conventions.StageDependenciesConvention.ExtractDependency(String file, String extractionDirectory) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\Conventions\StageDependenciesConvention.cs:line 98
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.Conventions.StageDependenciesConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\Conventions\StageDependenciesConvention.cs:line 33
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.ConventionProcessor.RunInstallConventions(IEnumerable`1 installConventions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 80
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.ConventionProcessor.RunConventions(Boolean logExceptions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 31
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       Unexpected file format in https_Clare-Octopus@dev.azure.com_Clare-Octopus_DevOps-Utilities__git_DevOps-Utilities@O0.0.0.0.9fea1beb0bc070e-da39a3e@54630b9.zip.
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       Expected Octopus cached file format: `<PackageId>@<Version>@<CacheBuster>.<Extension>` or `<PackageId>.<SemverVersion>.<Extension>`
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       System.Exception
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Common.Features.Packages.PackageName.FromFile(String path) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\Features\Packages\PackageName.cs:line 172
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Common.Features.Packages.CombinedPackageExtractor.GetExtractor(String packageFile) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\Features\Packages\CombinedPackageExtractor.cs:line 51
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Common.Features.Packages.CombinedPackageExtractor.Extract(String packageFile, String directory) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\Features\Packages\CombinedPackageExtractor.cs:line 42
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.Conventions.StageDependenciesConvention.ExtractDependency(String file, String extractionDirectory) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\Conventions\StageDependenciesConvention.cs:line 98
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.Conventions.StageDependenciesConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\Conventions\StageDependenciesConvention.cs:line 33
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.ConventionProcessor.RunInstallConventions(IEnumerable`1 installConventions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 80
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Deployment.ConventionProcessor.RunConventions(Boolean logExceptions) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 31
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Commands.RunScriptCommand.Execute(String[] commandLineArguments) in C:\BuildAgent\work\62728692c7c35200\source\Calamari\Commands\RunScriptCommand.cs:line 98
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Program.ResolveAndExecuteCommand(IContainer container, CommonOptions options) in C:\BuildAgent\work\62728692c7c35200\source\Calamari\Program.cs:line 62
Thu, Jan 22nd 2026 11:30:57 +00:00  Error       at Calamari.Common.CalamariFlavourProgram.Run(String[] args) in C:\BuildAgent\work\62728692c7c35200\source\Calamari.Common\CalamariFlavourProgram.cs:line 81
Thu, Jan 22nd 2026 11:31:00 +00:00  Fatal       The remote script failed with exit code 100
Thu, Jan 22nd 2026 11:31:00 +00:00  Fatal       The action Run a Script on a Worker failed
Release packages

More Information

Customer ticket (internal) - https://octopuscd.zendesk.com/agent/tickets/181687
RnD (internal) - https://octopusdeploy.slack.com/archives/CNHBHV2BX/p1769082628701719

Working Reproduction (internal) - https://octopus-operations.octopus.app/app#/Spaces-422/projects/ado-no-space/deployments/releases/0.0.6/deployments/Deployments-111217

Non-Working Reproduction (internal) -https://octopus-operations.octopus.app/app#/Spaces-422/projects/ado-new-repo/deployments/releases/0.0.1/deployments/Deployments-111211

Workaround

You will need to copy the URL of the ADO project and then remove the <username>@ once you have copied it into Octopus Version control settings for the project.

For example:

ADO Clone URL - https://Clare-Octopus@dev.azure.com/Clare-Octopus/New%20Repo/_git/New%20Repo
Octopus Version Control URL - https://dev.azure.com/Clare-Octopus/New%20Repo/_git/New%20Repo

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