-1

I am trying to Push on Git. I successfully changed my username & email by using

git config --global user.email "demo@gmail.com"
git config --global user.name "demo"

But When Pushing to Git, It is giving me error remote: Permission to username denied to perviously set username. Unable to access.

Can anyone help me to solve this error?

2 Answers2

0

This is somewhat speculative, but the issue could have to do with that some of the commits in your local branch still bear the incorrect username and/or email address. Type git log on the branch to check, and in particular pay attention to the new commits you have locally which the remote does not already know about.

See here for a number of methods to change the commit author for a Git branch.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
0

just follow these commands,

  • sudo dnf install git
  • git config --global user.name " "
  • git config --global user.email
  • git config --global credential.helper 'cache --timeout=31536000'