0
点赞
收藏
分享

微信扫一扫

fatal: could not read Username for ‘https://git.xxx.com‘: Device not configured

DYBOY 2022-01-21 阅读 173

使用情景:

使用sourcetree完成当前项目时报错
1、创建的feature分支,完成当前项目时
2、创建的hotfix分支,完成当前项目时

问题所在

1.在使用 webhook 自动部署时测试出现此问题
2.这里是因为你的git仓库是有用户名和密码,但是你没有配置git仓库的用户名和密码,而导致的问题

fatal: could not read Username for 'https://git.xxx.com': Device not configured

致命:无法读取的用户名'https://git.xxx.com“:未配置设备

解决方法

1、在你的私有库文件夹下面 vim .git/config
在这里插入图片描述
2、然后找到 [remote “origin”] 下面的url,把url链接改为https://username:password@git.xxx/xxx.git ,username:你的git仓库账号名,password:你的git仓库密码
修改前:url = https://git.xxxx.com/xxx/startModule.git
在这里插入图片描述

修改后:url = https://hello:666666@git.xxxx.com/xxx/startModule.git 此处:hello为git仓库用户名,666666为git仓库密码,用户名和密码用:间隔,密码和git地址用@间隔
在这里插入图片描述

然后你就可以再sourcetree上完成项目了
本问借鉴自:fatal: could not read Username for ‘https://git.dev.tencent.com’ 解决方法

举报

相关推荐

0 条评论