How to change my Git username in terminal?

后端 未结 13 1874
予麋鹿
予麋鹿 2020-12-07 07:17

I was pushing and pulling from git in Terminal then I changed my username on github.com. I went to push some changes and it couldn\'t push because it was still recognizing

13条回答
  •  北荒
    北荒 (楼主)
    2020-12-07 07:37

    If you have cloned your repo using url that contains your username, then you should also change remote.origin.url property because otherwise it keeps asking password for the old username.

    example:

    remote.origin.url=https://@
    

    should change to

    remote.origin.url=https://@
    

提交回复
热议问题