[英]Why can't I do a git push from my repository?
我最近從GitHub上的其他用戶帳戶克隆了一個git存儲庫,如下所示:
git clone https://github.com/some_user/fav-front.git
並得到:
remote: Permission to user_current/fav-front.git denied to user_prev.
fatal: unable to access 'https://github.com/user_current/fav-front.git/': The requested URL returned error: 403
但是,我仍然可以使用當前用戶執行git push。
參考
https://help.github.com/en/articles/cloning-a-repository
https://help.github.com/en/articles/create-a-repo
更新資料
這似乎是身份驗證問題。 我在存儲庫中執行git config --list
時,發現沒有用戶信息被填充。
我嘗試手動設置用戶名和電子郵件,但即使這樣也無法正常工作:
〜/ _top / fav-front> git config user.email'foo@foo.com'
〜/ _top / fav-front> git config user.name'foo'
user.name
和user.email
與身份驗證無關。
只有Git提交作者身份。
請檢查git config credential.helper
輸出:例如,如果是osxkeychain
,如在Git中緩存GitHub密碼中所示 ,然后按此處的github.com條目中的方式檢查鑰匙串 :
相應地編輯或刪除條目。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.