Skip to content

Commit to step: Variable subsitution doesn't work on repository url property #10137

Description

@tleed5

Severity

No response

Version

<= 2026.1

Latest Version

I could reproduce the problem in the latest build

What happened?

If you try to use a project variable or any other octostache expression in the commit to git repository url property, the step will fail when it attempts to parse the octostache expression as a git remote url as it doesn't evaluate the variable before doing so.

Reproduction

  1. Create a project with a repository url project variable
  2. Add commit to git step and bind the repository url property to the variable you created earlier
  3. Attempt to deploy

Error and Stacktrace

Cannot parse #{RepoUri} as a Git URL Octopus.Git.InvalidGitRemoteUrlException at Octopus.Git.GitRemoteUrl.Create(String input) in GitRemoteUrl.cs:line 17 at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Git.CommitToGitActionPropertiesLoader.ResolveLibraryGitCredential(GitCredentialId credentialId, String repositoryUrl, CancellationToken cancellationToken) in CommitToGitActionPropertiesLoader.cs:line 103 at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Git.CommitToGitActionPropertiesLoader.LoadLibraryCredential(DeploymentAction action, String repositoryUrl, CancellationToken cancellationToken) in CommitToGitActionPropertiesLoader.cs:line 91 at Octopus.Server.Orchestration.ServerTasks.Deploy.Steps.Git.CommitToGitActionPropertiesLoader.Load(DeploymentAction action, SpaceId spaceId, ProjectId projectId, DeploymentEnvironmentId environmentId, TenantId tenantId, CancellationToken cancellationToken) in CommitToGitActionPropertiesLoader.cs:line 65 at Octopus.Core.Orchestration.ServerTasks.Rules.WhenAServerTaskIsStarted.StartExecutionCommandFactory.Create(ServerTask serverTask, Instant startTime, ActivityTraceId activityTraceId, ActivitySpanId activitySpanId, CancellationToken cancellationToken, ProcessExecutionId processExecutionId) in StartExecutionCommandFactory.cs:line 107

More Information

No response

Workaround

Hard code the git repository url in the step's configuration

Metadata

Metadata

Assignees

Labels

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

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions