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
再次推送,顯示成功,完美解決問題!
