Unable to change Git account

I tried to click on my repository, but I got the error below:

git push origin master
remote: Permission to PhanVanLinh/phanvanlinh.imtqy.com.git denied to edgarphan.
fatal: unable to access 'https://github.com/PhanVanLinh/phanvanlinh.imtqy.com.git/': The requested URL returned error: 403

I used to use the username edgarphan, but I already changed it to PhanVanLinh, but it still saves edgarphan.

I tried to uninstall the project and clone again, uninstall Git and reinstall, but this will not work.

Enter image description here

Global configuration file

Enter image description here

How can I fix this problem?

+8
source share
2 answers

This has nothing to do with your settings user.name/ user.email: they are for authorship in commit. They are not used for authentication when clicking on a repo.

Git / GitHub (), , Git Windows Git , "manager" ( a git config credential.helper, )

: .

Windows (Windows start), " " "" Windows".
enter image description here
git.https://github.com, , / GitHub. Enter new credentials

.

+22

Git. Windows , ,

C:\Users\<user_name>\.gitconfig

. :

git config --global -e

:

cd /path/to/new/local/repo
git remote add origin https://github.com/PhanVanLinh/phanvanlinh.imtqy.com.git
git push -u origin master
0

Source: https://habr.com/ru/post/1687107/


All Articles