美文网首页
Git报错:could not read Username fo

Git报错:could not read Username fo

作者: Alen_ab56 | 来源:发表于2022-04-02 11:42 被阅读0次

原因:一般来说是使用的公司git仓库配置了用户名和密码

两种解决办法

一种是修改本地库文件 vim .git/config 

第二种方式是修改文件中的git地址,加上账号和密码
例如:修改后:url = https://username:pwd@git.xxxx.com/xxx/startModule.git
此处:username替换为git仓库用户名,pwd为git仓库密码,用户名和密码用:间隔,密码和git地址用@间隔

优缺点比较:

缺点是第一种只能满足本地编译需要,有的项目需要在work环境自动化部署,那么可以采取第二种方式

相关文章

网友评论

      本文标题:Git报错:could not read Username fo

      本文链接:https://www.haomeiwen.com/subject/jgdtsrtx.html