Я изменил user.name
и email
на новый аккаунт:
git config --global user.name "newusername"
git config --global user.mail "newmail@newmail.com"
тогда я подтолкнул некоторых сотрудников к новой учетной записи на github пользователя newusername. Затем я вышел из системы и теперь хочу добавить что-то в мой старый аккаунт Снова набираю:
git config --global user.name "oldusername"
git config --global user.mail "oldmail@oldmail.com"
когда я печатаю:
git config --list
тогда я получаю:
$ git config --list
core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
user.email=oldmail@oldmail.com
user.name=oldusername
credential.helper=store
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=https://github.com/oldmail/oldproject.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
Итак, я клонировал свой проект, внес изменения, зафиксировал и на git push
я получаю:
remote: Permission to oldusername/oldproject.git denied to newusername.
fatal: unable to access 'https://github.com/oldusername/oldproject.git/': The requested URL returned error: 403
URL returned error: 403
КАК ???! Где он видит имя нового пользователя? !!!