git commit -a,git使用git push 命令跳出remote: Permission to Aname denied to usernameB

 2023-10-08 阅读 17 评论 0

摘要:開始git上傳項目,不料,在git push這一步驟發生了錯誤? remote: Permission to nigelaozi/firstRepository.git denied to dalaoshi. fatal: unable to access 'https://github.com/nigelaozi/firstRepository.git/': The requested URL returned

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

remote: Permission to nigelaozi/firstRepository.git denied to dalaoshi.

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

git commit -a、納尼!怎么回事?!沒找到文件?

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

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

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

git怎么強制push?git config --global user.name xxx
git config --global user.email xxx@xxx

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

由于我用的是牛逼的thinkpad,操作可能有不同的地方,但原理都差不多。

打開控制面板 -- 打開憑證管理器 -- 普通憑證 有個 git:https://github.com 編輯修改用戶名和密碼即可。

git如何push。編輯賬號完成后,回到終端,再次輸入git push ,ok,問題也該解決了

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://hbdhgg.com/5/129842.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息