问题描述
git 使用的是ssh访问的, 配置好之后,拉取远程仓库没有问题, 但是在项目中代码拉去项目私有仓库时,报:
fatal: Cannot prompt because user interactivity has been disabled.
fatal: could not read Username for 'https://gitlab.cg.xxx': 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 config --global url.ssh://git@gitlab.cg.xxx/.insteadOf https://gitlab.cg.xxx/