I am trying to build a go application that makes use of git repositories that are private. I have an ssh key for my github account and have the following in my .gitconfig file:
[url "https://username:[email protected]"]
insteadOf = https://github.com
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
when I execute go test or go build I am asked for the passphrase. I then get a response:
go: found github.com/x/businesses in github.com/x/businesses v0.0.0-yy
go: cmd/main/cmd imports
github.com/x/businesses: github.com/x/[email protected]/go.mod:
verifying module: github.com/x/[email protected]/go.mod:
reading https://sum.golang.org/lookup/github.com/xx/[email protected]: 410 Gone
server response:
not found: github.com/x/[email protected]:
invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/*
in tmp/gopath/pkg/mod/cache/vcs/zz:
exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
I tried removing the top insteadOf in the .gitconfig for no reason other then to try something.