I was using git with my username and email and everything was working well. For one specific project I used different username and email to push some commits for another person. I set back git config user.name and git config user.email how they were but when I use git push it says "Permission to repo denied for "username of that person">". How can I solve this problem to make git use my username and email how they were.
Asked
Active
Viewed 405 times
0
-
1AFAIK git username and email are unrelated to pushing. Make sure your ssh, or other authentication, details are correct. – evolutionxbox May 14 '22 at 12:53
-
I know but I changed them back using git config --global user.name and git config --global user.email how they were before – unidentified May 14 '22 at 12:54
-
1`git config` is not for authentication. – evolutionxbox May 14 '22 at 12:55
-
1The SSH key you are using to push with is not attached to that repo. You need to re-set the SSH key – newbie May 14 '22 at 12:56
-
So, why do you think is throwing that permission error ? – unidentified May 14 '22 at 12:56
-
1Please share the actual error, and also the remote URL? – evolutionxbox May 14 '22 at 12:57
-
remote: Permission to
denied to – unidentified May 14 '22 at 13:11. The user which git is using to push commits to my repo refers to the user which I configured to push commits on another project how I mentioned in my quesion @evolutionxbox