go 拉取仓库依赖报错:fatal: could not read Username for ‘https://code.byted.org‘: terminal prompts disabled

Separes

关注

阅读 121

2022-02-08

文章目录

解决方法

在控制台输入以下命令,这个主要是配置我们拉取依赖源是哪一个,添加相应的仓库源

vim ~/.gitconfig
[user]
        email = email
        name = name
[url "git@github.com/:"]
 insteadOf = https://github.com/"
git config --global --add url."git@github.com:".insteadOf "https://github.com/"

参考文档:
https://medium.com/easyread/today-i-learned-fix-go-get-private-repository-return-error-terminal-prompts-disabled-8c5549d89045
https://stackoverflow.com/questions/32232655/go-get-results-in-terminal-prompts-disabled-error-for-github-private-repo

精彩评论(0)

0 0 举报