I want to use private repositories that are hosted at GitHub in another GoLang-project.
What I did:
- I created a private access token at my GitHub account settings
did then:
git config --global url."https://xxxxxx:ACCESS_TOKEN@github.com".insteadOf "https://github.com"
with "xxxxxx" as my real GitHub username and then the proper ACCESS_TOKEN.
go get github.com/private/repo
However, I get always the following error:
go: downloading github.com/xxxxxxxx/yyyyyyyyy-go-sdk v0.0.0-20200307154628-cbcb73911013
go get github.com/xxxxxxxx/yyyyyyyyy-go-sdk: github.com/xxxxxxxx/yyyyyyyyy-go-sdk@v0.0.0-20200307154628-cbcb73911013: verifying module: github.com/xxxxxxxx/yyyyyyyyy-go-sdk@v0.0.0-20200307154628-cbcb73911013: reading https://sum.golang.org/lookup/github.com/xxxxxxxx/yyyyyyyyy-go-sdk@v0.0.0-20200307154628-cbcb73911013: 410 Gone
server response:
not found: github.com/xxxxxxxx/yyyyyyyyy-go-sdk@v0.0.0-20200307154628-cbcb73911013: invalid version: git fetch -f origin refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /tmp/gopath/pkg/mod/cache/vcs/5eca4f397ed3a418f58ee864965ed24936e21268780304d6941f5b3983d31ad1: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
I have also tried the following:
GONOSUMDB=github.com/myusername go get github.com/xxxxxx/yyy...
And according to some answers at StackOverflow for similar issues I tried to add ".git" after the repo-url. But this won't work at all.
What could this be and how can I fix this?
Versions:
♠ git --version
git version 2.25.0
hub version 2.14.2
♠ go version 1.14