0

The command I'm trying to use is go get github.com/privaterepo, and this is the output that is returned.

go: downloading github.com/privaterepo: verifying module: github.com/privaterepo: reading https://sum.golang.org/lookup/github.com/privaterepo@v0.0.0-20220816140521-df873cb81b7f: 404 Not Found
        server response:
        not found: github.com/privaterepo@v0.0.0-20220816140521-df873cb81b7f: invalid version: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/1741f20314f0c79cb0304fb5d454313d8508dfc920dcde743081a25aa8334f25: exit status 128:
                fatal: could not read Username for 'https://github.com': terminal prompts disabled
        Confirm the import path was entered correctly.

I don't really understand this error since I am of course logged in into GitHub, and if I try to manually clone the repo using git clone it works perfectly. Could someone help me with this?

Furthermore, reading online to try to enable terminal prompts using GIT_TERMINAL_PROMPT=1 but nothing happens.

dharmey
  • 85
  • 2
  • 8
  • 2
    How are you "logged into Github"? When you `git clone` from the same command line as you're running `go get`, do you have to enter any credentials? – Schwern Nov 19 '22 at 19:30
  • You have to work with GitHub private repo like other private repo -> try https://stackoverflow.com/a/61088072/8030651 – kozmo Nov 19 '22 at 20:41
  • @Schwern nope, I don't have to enter any credentials as my credentials are stored into git. Thats what I mean by saying "logged in". – dharmey Nov 20 '22 at 10:09

0 Answers0