Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change the username in git?

I know its a common question, but even after apply various solutions I'm still not able to change the username. every time when i try to push my changes on git, i'm getting below error.

PS C:\storage\class\11-1\Angular> git push origin DevBW-AngularAws remote: Permission to varun9797/BetterWorldUI.git denied to test9777. fatal: unable to access 'https://github.com/varun9777/BetterWorldUI.git/': The requested URL returned error: 403

I tried below command as well.

git config credential.username "varun9777"

But still getting the same error at the time of push only.

I want to change the username abc-xyz to varun9777

Please help. Thanks in advance.

like image 773
Varun verma Avatar asked Nov 25 '25 19:11

Varun verma


1 Answers

git remote set-url origin https://varun9797:[email protected]/varun9797/BetterWorldUI.git

We can set repository url that contains git credentials.

like image 54
Yang Yu Avatar answered Nov 27 '25 08:11

Yang Yu