Skip to content

Commit

Permalink
fix: Fixes git over azure devops Fixes argoproj#11705
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Lütke Stetzkamp <cls@tessitura.io>
  • Loading branch information
Christian Lütke Stetzkamp committed Feb 12, 2024
1 parent 66680f1 commit 6d0a832
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions workflow/artifacts/git/git.go
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/protocol/packp/capability"
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/plumbing/transport/http"
ssh2 "github.com/go-git/go-git/v5/plumbing/transport/ssh"
Expand Down Expand Up @@ -84,6 +85,14 @@ func (g *ArtifactDriver) Delete(s *wfv1.Artifact) error {

func (g *ArtifactDriver) Load(inputArtifact *wfv1.Artifact, path string) error {
a := inputArtifact.Git

// Azure DevOps requires capabilities multi_ack / multi_ack_detailed,
// which are not fully implemented and by default are included in
// transport.UnsupportedCapabilities.
transport.UnsupportedCapabilities = []capability.Capability{
capability.ThinPack,
}

sshUser := GetUser(a.Repo)
closer, auth, err := g.auth(sshUser)
if err != nil {
Expand Down

0 comments on commit 6d0a832

Please sign in to comment.