Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio Code won't allow to change GitHub user - Git:remote: Permission to Org/Rep denied

I want to change the original user that I initialized on Visual Studio Code for my GitHub account. I created a different account for work versus my personal one and cannot change the personal account to the work account.

I am trying to send the changes to GitHub but keep running into a permission denied to my personal account.

Git: remote: Permission to Organization/Repository.git denied to *personal account*

github push

I know the GitHub push to my personal account works. So I know git and GitHub was setup properly. However, even after deleting git and Visual Studio Code, I cannot get the original sign in prompt to GitHub or find a way to change the user.

edit*

$ git push -u origin master
remote: Permission to Organization/TestRepo.git denied to mebrunner24.
fatal: unable to access 'https://github.com/Organization/TestRepo.git/': 
The requested URL returned error: 403

This is the error that I get when I try to use git bash as well. Essentially the same as VSC. This is not the same error as putting mutliple accounts. I cannot change the account period.

At this point I'm looking to completely wipe out git on this computer and start fresh. However, when I uninstall git I'm STILL having the same issue.

*Edit 2: I have now added myself to the organization as mebrunner24 and I still cannot get past this error. I am at a complete loss. I can push everything to my personal repository on this machine just fine. But going to the Organization one does not work at all

*Edit 3: I have added myself to the organization and provided myself write access for repository I want to write to. This works, kind of. It shows up as the work account, not my personal account that gave the commit. Once I remove myself from the Organization, I'm still having this same issue

like image 581
mebrunner24 Avatar asked Oct 20 '25 20:10

mebrunner24


1 Answers

Go to control panel ,select user accounts options ,credential manager,edit generic credential for existing GitHub account and remove the existing account

like image 123
MWACHARO JOHN Avatar answered Oct 22 '25 15:10

MWACHARO JOHN



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!