I'm a beginner in Git.
When I tried to push to GitHub, I got the following error.
(The user name has been rewritten to Hoge and Fuga, which is actually different.)

remote: Permission to Hoge/git-practice.git denied to Fuga.
fatal: unable to access'https://github.com/Hoge/git-practice.git/': The requested URL returned error: 403

Even if you check with git config -l, it is as follows.

user.name = Hoge
[email protected]
core.repositoryformatversion = 0
core.filemode = true
core.bare = false
core.logallrefupdates = true
core.ignorecase = true
core.precomposeunicode = true
remote.origin.url = https://github.com/Hoge/git-practice.git
remote.origin.fetch = + refs/heads/*: refs/remotes/origin/*

I know I want Fuga to be empowered, but
I want to remove this Fuga from the world, how can I remove it?

  • Answer # 1

    I deleted github.com with Mac keychain access, re-linked it with Vscode, and I was able to push!