1. 程式人生 > >解決:git使用git push 命令跳出remote: Permission to A denied to B的問題

解決:git使用git push 命令跳出remote: Permission to A denied to B的問題

fat fir user perm img light ima 上傳 再次

開始git上傳項目,不料,在git push這一步驟發生了錯誤?

remote: Permission to qwe2193066947/firstRepository.git denied to murenziwei.

fatal: unable to access ‘https://github.com/qwe2193066947/firstRepository.git/‘: The requested URL returned error: 403

納尼!怎麽回事?!沒找到文件?

這錯誤翻譯成中文的大概意思:用戶murenziwei沒有權限訪問用戶qwe2193066947的存儲庫firstRepository。

也就是說,git環境終端裏,我登入的是murenziwei賬號,所以我就應該換成qwe2193066947賬號才能解決問題。

於是,立刻執行登錄github賬號的有關git命令行

git config --global user.name xxx
git config --global user.email xxx@xxx

然並卵,連輸入密碼的步驟都沒看見,就能算切換賬號成功?顯然,此番失敗後,只能通過網上資料找到另一個方法解決。

由於我用的是華碩臺式,操作可能有不同的地方,但原理都差不多。

控制面板-->用戶

技術分享圖片

編輯賬號完成後,回到終端,再次輸入git push ,不出意外的話,自家人自然能打自家人,問題也該解決了

技術分享圖片

解決:git使用git push 命令跳出remote: Permission to A denied to B的問題