VS2017提交代碼到GitHub時報錯:未能推送到遠程存儲庫

一、錯誤內容
未能推送到遠程存儲庫。請參見輸出窗口瞭解更多詳細信息。

Git failed with a fatal error. 
HttpRequestException encountered. 
��������ʱ����� 
cannot spawn askpass: No such file or directory 
could not read Username for ‘https://github.com‘: terminal prompts disabled 
Pushing to https://github.com/sunxiaobei/DesignPattern.git
二、解決方法
1、打開項目所在的目錄下.git文件夾,打開config文件。

2、修改[remote “origin”]

url = https://github.com/XXXXX/XXXXx.git
爲 

url = https://自己的用戶名:自己的密碼@github.com/sunxiaobei/DesignPattern.git
增加:自己的用戶名:自己的密碼@

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章