Errors downloading dependencies in Go project with dep ensure

Daniel's Avatar

Daniel

11 Mar, 2019 11:17 PM

I am having frequent errors downloading dependencies with dep ensure, more often than not the build is failing though not always. It seems to be related to packages on golang.org/x/ but I'm not having similar issues on my builds running on a different service. Any suggestions would be appreciated.

Here is the project:
https://ci.appveyor.com/project/influx/telegraf/history

A few recent errors:

dep ensure -vendor-only
grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to export golang.org/x/oauth2: 
    (1) failed to list versions for https://go.googlesource.com/oauth2: fatal: remote error: Internal Server Error
exit status 128
dep ensure -vendor-only
grouped write of manifest, lock and vendor: error while writing out vendor tree: failed to write dep tree: failed to export golang.org/x/net: failed to fetch source for https://go.googlesource.com/net: unable to get repository: Cloning into 'C:\gopath\pkg\dep\sources\https---go.googlesource.com-net'...
fatal: remote error: Internal Server Error
command failed: [git clone --recursive -v --progress https://go.googlesource.com/net C:\gopath\pkg\dep\sources\https---go.googlesource.com-net]: exit status 128
  1. Support Staff 1 Posted by Ilya Finkelshte... on 11 Mar, 2019 11:34 PM

    Ilya Finkelshteyn's Avatar

    Hi Daniel,

    Error Internal Server Error exit status 128 is clearly remote server error, unrelated to AppVeyor. Also I see that your Circle CI build failed the same way.

    I would speculate (looking at error code) that it is Git issue on the backend system of go.googlesource.com which engineers responsible for this service most probably already noticed. So I would just wait. Or contact googlesource.com support.

    Ilya.

  2. 2 Posted by Daniel on 12 Mar, 2019 12:07 AM

    Daniel's Avatar

    Thanks, I hadn't noticed it on Circle CI before, but I only have caching setup over there so perhaps that reduces how often it fails. I'll be adding that to my build on appveyor soon hopefully.

    I've been seeing this error off an on for a some time, at least several weeks, and I also found others with this issue. I think swiching away from go.googlesource.com to the github mirrors will take care of it though, I'm just doing this by adding a source to my Gopkg.toml:

     [[constraint]]
       branch = "master"
       name = "golang.org/x/oauth2"
    +  source = "https://github.com/golang/oauth2.git"
    
  3. Support Staff 3 Posted by Ilya Finkelshte... on 12 Mar, 2019 05:34 PM

    Ilya Finkelshteyn's Avatar

    Sure, this I believe will be more reliable. Note that you can setup cache with AppVeyor as well. Also you can add appveyor-retry before flaky commands.

  4. Ilya Finkelshteyn closed this discussion on 12 Mar, 2019 05:34 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac