各位大佬们,当我在构建docker容器的时候意外遇到了这个错误,想问问各位如何解决
其中docker报错
answer imports
github.com/answerdev/answer-basic-connector: module github.com/answerdev/answer-basic-connector: git ls-remote -q origin in /go/pkg/mod/cache/vcs/2eb01f4aadbb28882970063faa18a6e807b04bd4da767dddd04d856f1fa4e95b: exit status 128:
fatal: could not read Username for 'https://github.com': terminal prompts disabled
Confirm the import path was entered correctly.
If this is a private repository, see https://golang.org/doc/faq#git_https for additional information.
增加git环境变量
再次执行go build 会提示输入git仓库输入登录密码验证,即可。