首页 > 其他 > 详细

备忘录:VS中使用Git报错

时间:2020-07-06 00:59:37      阅读:81      评论:0      收藏:0      [点我收藏+]

1.问题

VS2019使用Git将代码推送远程仓库时弹出Github的输入用户名和密码的窗口,
在我输入用户名和密码后,显示未推送成功,
输出窗口内容如下:

正在推送 master
发布到远程存储库时遇到错误: Git failed with a fatal error.
TaskCanceledException encountered.
   ????????????
cannot spawn /c/program files (x86)/microsoft visual studio/2019/enterprise/common7/ide/commonextensions/microsoft/teamfoundation/team explorer/Git/mingw32/libexec/git-core/git-askpass.exe: No such file or directory
could not read Username for ‘https://github.com‘: terminal prompts disabled
Pushing to https://github.com/shanzm/ASP.NET-Core.git

2. 解决方案

修改仓库的.git文件夹中的config文件,将文件中的:

url = https://github.com/shanzm/ASP.NET-Core.git

修改为:

url = https://用户名:密码@github.com/shanzm/ASP.NET-Core.git

再次推送,显示成功,完美解决问题!

备忘录:VS中使用Git报错

原文:https://www.cnblogs.com/shanzhiming/p/13252472.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!