Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Gopkg.toml override source question #1181

Closed
xcorpio opened this issue Sep 19, 2017 · 2 comments
Closed

Gopkg.toml override source question #1181

xcorpio opened this issue Sep 19, 2017 · 2 comments

Comments

@xcorpio
Copy link

xcorpio commented Sep 19, 2017

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

@sdboyer
Copy link
Member

sdboyer commented Sep 20, 2017

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.)

@sdboyer sdboyer closed this as completed Sep 20, 2017
@DiveInto
Copy link

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

saved my life

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants