Git拉取身份验证问题
root@z-Default-string:/app/xmy# git pull fatal: could not read Username for 'https://gitee.com': terminal prompts disabled fatal: could not read Username for 'https://gitee.com': terminal prompts disabled here i'm in visual studio to open a container
在使用 Visual Studio Code(VSCode)连接 Docker 容器时运行 git pull,但遇到以下错误:
这是因为在容器中执行 git pull,而 Git 想要提示输入 Gitee 的用户名和密码,但在容器的无交互终端环境中无法显示提示框。
解决方案:使用 Gitee 的 HTTPS Token
格式:https://<username>:<token>@gitee.com/<username>/<repo>.git
完整命令:git remote set-url origin https://userrname:username's HTTPS Token@gitee.com/xxx/xxx.git

本文来自博客园,作者:z_s_s,转载请注明原文链接:https://www.cnblogs.com/zhoushusheng/p/18904770
浙公网安备 33010602011771号