Skip to content

Commit

Permalink
Merge pull request #421 from vishnoianil/upgrade-pathservice
Browse files Browse the repository at this point in the history
Update go-git to latest stable version
  • Loading branch information
nerdalert authored Dec 13, 2024
2 parents 41f6378 + 010f5dc commit 464b087
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 67 deletions.
22 changes: 16 additions & 6 deletions pathservice/cmd/pathservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import (
"github.com/spf13/cobra"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
git "gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/plumbing"
git "github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
)

const (
Expand Down Expand Up @@ -51,10 +52,19 @@ func (ps *PathService) cloneRepo() error {
ps.logger.Errorf("Repository already exists at %s, skip cloning", repoDir)
return nil
}
_, err := git.PlainClone(repoDir, false, &git.CloneOptions{
URL: repoURL,
// Clone options
cloneOptions := &git.CloneOptions{
URL: repoURL,
Auth: &githttp.BasicAuth{
Username: "",
Password: "",
},
Progress: os.Stdout,
})
}

cloneOptions.InsecureSkipTLS = true

_, err := git.PlainClone(repoDir, false, cloneOptions)
return err
}

Expand Down
31 changes: 21 additions & 10 deletions pathservice/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,34 @@ go 1.21.4

require github.com/spf13/cobra v1.8.1

require go.uber.org/multierr v1.10.0 // indirect
require (
dario.cat/mergo v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
go.uber.org/multierr v1.10.0 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/tools v0.13.0 // indirect
)

require (
github.com/emirpasic/gods v1.12.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/go-git/go-git/v5 v5.12.0
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/sergi/go-diff v1.0.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/sys v0.28.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1
gopkg.in/warnings.v0 v0.1.2 // indirect
)
Loading

0 comments on commit 464b087

Please sign in to comment.