0

I had a git account from my university that I used with my git repositories for my university projects, but now want to to push and pull to my own personal git repositories with my own personal git account (not my university account).

I always get the following error when I try to push or pull from my own repositories:

remote: Permission to repositoryName.git denied to university-username. fatal: unable to access 'https://github.com/respositoryName.git/': The requested URL returned error: 403

I am using Linux Mint and have tried the following with no success:

  • Uninstalling and purging all files related to git, then reinstalling and trying to push to my repository.
  • Tried to follow the steps from this post: Remove credentials from Git, but cannot seem to get it working as I am running on Linux.
  • Tried using git credential fill and entering the username and password and other details I want to use.
  • Tried setting my new username and email with git config --global user.name newUsername and git config --global user.email newEmail

I am stumped as to what I need to do to completely remove my old credentials and replace them with my new ones.

Mr Kaos
  • 3
  • 3
  • The link posted by @Matt sounds like a reasonable approach to me. Also, do you use username/password credentials or perhaps ssh keys? You can also run `git config --list --show-origin` to see if perhaps some git config like `credential.helper` is set on e.g. your global git config, which you were not aware of. If you could add the output of `git config --list --show-origin |grep credential` that may help solving your problem. – schilli Jun 05 '21 at 13:02

0 Answers0