DEV Community

D
D

Posted on

go modでプライベートgithub参照の時

こんなエラー出たら

go: finding module for package github.com/***/***
go: downloading github.com/***/*** v0.0.0-20200424032624-7ee614f6e303
github.com/***/*** imports
        github.com/***/***/***: github.com/***/***@v0.0.0-20200424032624-7ee614f6e303: verifying module: github.com/***/***@v0.0.0-20200424032624-7ee614f6e303: reading https://sum.golang.org/lookup/github.com/***/***@v0.0.0-20200424032624-7ee614f6e303: 410 Gone
        server response:
        not found: github.com/***/***@v0.0.0-20200424032624-7ee614f6e303: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /tmp/gopath/pkg/mod/cache/vcs/2d253e2ea6ebdb2e3be78af07d3b07b09c565cb0a0efc6a1ac5deb8f6aeca582: exit status 128:
                fatal: could not read Username for 'https://github.com': terminal prompts disabled
Enter fullscreen mode Exit fullscreen mode

以下のように設定

$ vim ~/.gitconfig
[url "git@github.com:"]
    insteadOf = https://github.com/

$ vim ~/.bashrc
export GO111MODULE=on # Go Mobules
export GOSUMDB=off
export GOPROXY=direct
Enter fullscreen mode Exit fullscreen mode

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay