1. 程式人生 > >GitHubDesktop許可權問題解決辦法

GitHubDesktop許可權問題解決辦法

Desktop對於管理倉庫非常方便、實用

很多人實用Desktop將倉庫專案clone到本地

但是更新後同步時出現瞭如下許可權錯誤:

Error

Authentication failed. You may not have permission to access the repository or the repository may have been archived. Open options and verify that you're signed in with an account that has permission to access this repository.

網上給出了兩種解決辦法:

1.退出後重新登入

2.設定專案repository settings改為https的遠端url地址

經過測試,發現這兩種方式都沒有起到作用

於是我猜測可能是使用者名稱密碼沒有儲存

github desktop目前版本不會提示輸入使用者名稱密碼

於是設定了專案的repository settings

將remote repository設定成:https://註冊名:密碼@github.com/xmilt/xmilt.github.io.git

才能正常pull和push等操作。

(目前方式可能有本地洩露密碼的風險,如果有更好的辦法歡迎大家補充)