Git pushing to remote GitHub repository as wrong user

后端 未结 15 823
别跟我提以往
别跟我提以往 2020-11-30 17:49

I have a work GitHub account and a personal one. First I used the personal one for test projects, then I moved on and did a repository with the other account on the same com

15条回答
  •  眼角桃花
    2020-11-30 18:12

    If changing the SSH key associated with the account doesn't work, change the email associated with the account.

    Go to Github > Account Settings > Emails and verify the email address you are using to commit matches the email on the account.

    To see what email address you're using to commit, run the following command: git config --global user.email. If you need to change the email address that you are using to commit, run git config --global user.email "your_email@youremail.com".

提交回复
热议问题