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等操作。
(目前方式可能有本地泄露密碼的風險,如果有更好的辦法歡迎大家補充)