Dep: Gopkg.toml override source question

Created on 19 Sep 2017  ยท  2Comments  ยท  Source: golang/dep

I am build a gRpc helloword client with the import

"golang.org/x/net/context"
"google.golang.org/grpc"

I can't access these two repositories directly. So i make my Gopkg.toml file like this:

[[override]]
  name = "golang.org/x/net"
  source = "https://github.com/golang/net.git"

[[override]]
  name = "google.golang.org/grpc"
  source = "https://github.com/grpc/grpc-go.git"

What version of dep are you using (dep version)?

dep: stable 0.3.0 (bottled), HEAD

What dep command did you run?

dep ensure -v

8 transitively valid internal packages
 10 external packages imported from 6 projects
(0)   โœ“ select (root)
(1) ? attempt github.com/astaxie/beego with 5 pkgs; at least 1 versions to try
(1)     try github.com/astaxie/[email protected]
(1) โœ“ select github.com/astaxie/[email protected] w/11 pkgs
(2) ? attempt github.com/smartystreets/goconvey with 1 pkgs; at least 1 versions to try
(2)     try github.com/smartystreets/[email protected]
(2) โœ“ select github.com/smartystreets/[email protected] w/3 pkgs
(3) ? attempt github.com/golang/protobuf with 1 pkgs; at least 1 versions to try
(3)     try github.com/golang/protobuf@master
(3) โœ“ select github.com/golang/protobuf@master w/1 pkgs
(4) ? attempt github.com/jtolds/gls with 1 pkgs; at least 1 versions to try
(4)     try github.com/jtolds/[email protected]
(4) โœ“ select github.com/jtolds/[email protected] w/1 pkgs
(5) ? attempt github.com/gopherjs/gopherjs with 1 pkgs; at least 1 versions to try
(5)     try github.com/gopherjs/gopherjs@master
(5) โœ“ select github.com/gopherjs/gopherjs@master w/1 pkgs
(6) ? attempt github.com/smartystreets/assertions with 1 pkgs; at least 1 versions to try
(6)     try github.com/smartystreets/[email protected]
(6) โœ“ select github.com/smartystreets/[email protected] w/3 pkgs
(7) ? attempt google.golang.org/grpc (from https://github.com/grpc/grpc-go.git) with 1 pkgs; 22 versions to try
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.6.0
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.5.2
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.5.1
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.5.0
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.4.2
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.4.1
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.4.0
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.3.0
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.2.1
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.2.0
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.0.5
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.0.4
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.0.3
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.0.2
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.0.0
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.0.1-GA
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@master
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.2.x
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.3.x
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.4.x
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.5.x
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)     try google.golang.org/grpc (from https://github.com/grpc/grpc-go.git)@v1.6.x
(7) โœ—   unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
(7)   โ† no more versions of google.golang.org/grpc (from https://github.com/grpc/grpc-go.git) to try; begin backtrack
(6) โ† backtrack: no more versions of github.com/smartystreets/assertions to try
(5) โ† backtrack: no more versions of github.com/gopherjs/gopherjs to try
(4) โ† backtrack: no more versions of github.com/jtolds/gls to try
(3) โ† backtrack: no more versions of github.com/golang/protobuf to try
(2) โ† backtrack: no more versions of github.com/smartystreets/goconvey to try
(1) โ† backtrack: no more versions of github.com/astaxie/beego to try
  โœ— solving failed

Solver wall times by segment:
  b-deduce-proj-root: 1m0.00411199s
     b-source-exists: 12.047411638s
         b-list-pkgs:  7.328648724s
              b-gmal:  5.921138257s
             satisfy:   38.145696ms
         select-root:    2.033436ms
            unselect:    1.882225ms
         select-atom:    1.861921ms
            new-atom:     609.517ยตs
           backtrack:      48.386ยตs
     b-list-versions:      46.069ยตs
               other:       9.209ยตs

  TOTAL: 1m25.345947068s

ensure Solve(): No versions of google.golang.org/grpc met constraints:
    v1.6.0: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.5.2: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.5.1: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.5.0: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.4.2: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.4.1: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.4.0: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.3.0: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.2.1: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.2.0: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.0.5: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.0.4: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.0.3: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.0.2: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.0.0: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.0.1-GA: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    master: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.2.x: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.3.x: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.4.x: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.5.x: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout
    v1.6.x: unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout

the

[[override]]
  name = "golang.org/x/net"
  source = "https://github.com/golang/net.git"

seems invalid

Most helpful comment

hi, welcome! let's look a little more closely at those errors:

unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout

my guess is that you're running into the GFW.

as for why we still have to do those deductions and reach out even when the source field is specified, this is an increasingly common concern. the reasons why we still do it are kinda complicated, and we can probably get around it - see #860.

(closing this, as we can't do anything directly about the GFW, and we've got issues already for the latter problem.)

All 2 comments

hi, welcome! let's look a little more closely at those errors:

unable to deduce repository and source type for "golang.org/x/net/context": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net/context?go-get=1": Get http://golang.org/x/net/context?go-get=1: dial tcp 61.91.161.217:80: i/o timeout

my guess is that you're running into the GFW.

as for why we still have to do those deductions and reach out even when the source field is specified, this is an increasingly common concern. the reasons why we still do it are kinda complicated, and we can probably get around it - see #860.

(closing this, as we can't do anything directly about the GFW, and we've got issues already for the latter problem.)

my guess is that you're running into the GFW.

saved my life

Was this page helpful?
0 / 5 - 0 ratings