0

So far, I have two git accounts that I use, one for my school, and one for my personal endeavors. I am looking to push some changes to git repo. Now I changed git username and user email using the commands noted below, then I git cloned files I was interested in making changes to, and I wanted to git push those changes, but my git bash is still looking at the permissions of my old account and will not switch to my other account. How do I fix the following error?

$ git push --set-upstream origin setDatabase
remote: Permission to lullaby/example.git denied to school-account-barEfu.
fatal: unable to access 'https://github.com/lullaby/example.git/': The requested URL returned error: 403

I wanted to use account barkotefuye, which has access to the following repository. It is also important to note the repo "example" is private. I used

  • user config username -- barkotefuye

  • user config email-- myemail@mail.com

befuye
  • 1

1 Answers1

0

Changing email and username on git config, does not change account.

Looks like you don't have permissions to push to that repo. Have you authenticated your account, see this article. I'd recommend authenticating using your SSH keys.

Also, the syntax in your commands is slightly wrong, try this:

git config user.name "Barkot Efuye"

git config user.email "email@example.com"

Sources: Setting username, Setting email address

Alicia Sykes
  • 5,997
  • 7
  • 36
  • 64