問題描述
今天我在使用git push 將修改的項(xiàng)目push到github中,出現(xiàn):
remote: Permission to xxxxx.git denied to xxx. fatal: unable to access 'https://github.com/ xxxxx.git/': > The requested URL returned error: 403
解決方案
第一步,將github中的項(xiàng)目clone下來
第二步该贾,修改.git/cofig中的url
cd 到項(xiàng)目中捶码,編輯 .git/cofig中的url
vim .git/config
將
[remote "origin"]
url = https://github.com/git的用戶名/項(xiàng)目名稱
的url改為
url = https://git的用戶名@github.com/git的用戶名/項(xiàng)目名稱