1. 程式人生 > >Push failed fatal: unable to access 'https://github.The requested URL returned error: 403

Push failed fatal: unable to access 'https://github.The requested URL returned error: 403

今天push程式碼到github上面時, 一直報這個錯誤。

Push failed: Failed with error: fatal: unable to access 'https://github.com/xxx/UI_design_demo.git/': The requested URL returned error: 403

然後去網上找了許多方法,最多的就是找到檔案目錄下的.git然後開啟config檔案在url: https://github使用者名稱@github.com/專案名,然後重試。
或者將https改為ssh方式。
兩種方法都試過了,仍然不行,後來就用另一個平臺coding.net來下載程式碼依然是這個錯誤,這種我就明白不是網站的問題,是自己的android studio出了問題。

最奇葩的是當我將電腦網路從無線連線改成用網線連線之後,竟然成功更新程式碼,沒再返回403錯誤。

不知道什麼原因,我用的房東提供的二手網,即從路由器拉出網線到我房間,然後我再用無線路由接的這條網線。事實就是我用無線連電腦更新失敗,改用有線之後就正常了。超級超級無語中。