go-git icon indicating copy to clipboard operation
go-git copied to clipboard

I cannot require go-git with a package that uses a newer version of `x/oauth2`

Open crhntr opened this issue 5 years ago • 1 comments

When I import go-git.v4 v4.13.1 with k8s.io/[email protected], I get a build failure.

$ go run cmd/server/main.go
# gopkg.in/src-d/go-git.v4/plumbing/transport/ssh
../../pkg/mod/gopkg.in/src-d/[email protected]/plumbing/transport/ssh/common.go:147:15: undefined: proxy.Dial

my go.mod

module example

go 1.13

require (
        // ...
-	golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be
+	golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45
        // ...
        gopkg.in/src-d/go-git.v4 v4.13.1
+	k8s.io/client-go v0.0.0-20191016111102-bec269661e48
)
  • It looks like the go-git CI is locked on Go 1.11 and y'all are using an old version of oauth2.
  • Also it looks like master no longer has x/oauth2 in it. So this issue may be fixed by the next release?
  • Let me know if I can help with a PR or something. :)

Thanks!

crhntr avatar Dec 11 '19 08:12 crhntr

Updating golang.org/x/net worked for me. Put this in your go.mod file:

replace golang.org/x/net => golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa

matkam avatar Jan 17 '20 00:01 matkam