zoukankan      html  css  js  c++  java
  • 备忘录:VS中使用Git报错

    shanzm-2020年7月7日

    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
    

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

  • 相关阅读:
    读取声音文件的方法
    在MAC电脑上抓取iphone数据包的方法
    Mac+IPAD上使用wireshark抓包
    2020/7/24
    2020牛客多校第二场01,05题
    2020/7/23
    2020/7/22
    2020/7/20
    2020/7/19
    2020/7/18
  • 原文地址:https://www.cnblogs.com/shanzhiming/p/13252472.html
Copyright © 2011-2022 走看看