Problem description

I used github account before and excute “push -u origin master” to upload my files to projects on github. Today I created a project on gitee and try to upload files from macbook to gitee according to the instructions on the gitee, as shown in below figure.

gitee_comments

However, when I run the comment “git push -u origin master”, a error appeared:

remote: Access denied
fatal: unable to access ‘https://gitee.com/phylu/phylu.git/’: The requested URL returned error: 403

The solution

I tried to add ssh to gitee but did not help. Then I realized that it may be due to the conflict between the two accounts of github and gitee since I used github account before. Therefore, I deleted the github account in terminal and it works. The comments which neede to be input in the terminal are:

git credential-osxkeychain erase
host=github.com
protocol=https
[press enter twice]