shurcooL / home

home is Dmitri Shuralyov's personal website.
https://dmitri.shuralyov.com
MIT License
76 stars 2 forks source link

go get fails on your new home repo #23

Closed ydnar closed 5 years ago

ydnar commented 5 years ago

Our builds are broken with this error:

go: finding dmitri.shuralyov.com/service/change v0.0.0-20190320022222-9a7a6e8aef50
go: dmitri.shuralyov.com/service/change@v0.0.0-20190320022222-9a7a6e8aef50: git -c protocol.version=0 fetch --unshallow -f https://dmitri.shuralyov.com/service/change refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /Users/ydnar/go/pkg/mod/cache/vcs/6337fe80c0c5be37685948ddcad19803db757c3ff59a7275f1d6cbb32466323d: exit status 128:
    fatal: the remote end hung up unexpectedly
go: error loading module requirements

Did you move your modules off GitHub?

dmitshur commented 5 years ago

Hi.

I haven't moved anything recently. Is there a command I can run to reproduce the problem?

From the error message, it looks like it might've been a transient network error. Have you tried restarting your build?

ydnar commented 5 years ago

This happened last night on my MacBook—I assumed it was a transient network error and tried again this morning. I got the same error.

I just re-ran it from a new network (including a VPN), and it failed with the same error. I checked my .gitconfig and there’s nothing in it that should affect accessing git on your host.

I upgraded git and got the same error.

dmitshur commented 5 years ago

What was the command you ran?

ydnar commented 5 years ago

go get.

Just tried deleting the cache directory, and that seemed to fix it:

rm -rf /Users/ydnar/go/pkg/mod/cache/vcs/6337fe80c0c5be37685948ddcad19803db757c3ff59a7275f1d6cbb32466323d

Odd—haven’t seen this before.

dmitshur commented 5 years ago

I was going to suggest trying with an empty module cache directory. Glad to hear that fixes it.

You wouldn't have by any chance made a backup of that directory? If so, if you don't mind sharing a copy so I can reproduce the original problem, I'd like to be able to investigate what was causing it. If you no longer have a copy, that's okay, we can hope it was an old bug that's fixed in the newest version of Go.

dmitshur commented 5 years ago

I'll close this since the issue is resolved, but please feel free to re-open if it occurs again.