Skip to content

Commit

Permalink
fix git clone in azure devops
Browse files Browse the repository at this point in the history
  • Loading branch information
raulcabello committed Dec 22, 2023
1 parent f856718 commit 307a088
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/gitcloner/gogit/cloner.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/go-git/go-git/v5"
"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"
httpgit "github.com/go-git/go-git/v5/plumbing/transport/http"
gossh "github.com/go-git/go-git/v5/plumbing/transport/ssh"
Expand Down Expand Up @@ -37,6 +38,12 @@ func NewCloner() *Cloner {
}

func (c *Cloner) CloneRepo(opts *cmd.Options) error {
// 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,
}
auth, err := createAuthFromOpts(opts)
if err != nil {
return err
Expand Down

0 comments on commit 307a088

Please sign in to comment.