🌒MoonLab

> 在MoonLab中搜索

Git push 出现 permisson denied error 403

Category: Programming

git最开始

$ git push -u origin main

output:

remote: Permission to ViteMux/repo.git denied to Olduser.

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

我设置了local的username,但是却显示了旧用户被拒绝请求了,所以我以为是上一次的commit的author还是旧用户

所以我尝试:

$ git commit –amend –reset-author

结果还是一样,最后在 stackoverflow 中找到了方法

把这个凭证删了就行,浪费我1个小时。

2018-2023 MoonLab