I have two Github accounts, one is troy and another is yort, I've generated ssh keys for both and associated them to related Github account. BTW, id_rsa
is the identity file for troy, and id_rsa_yort
is for yort.
For one project of the yort account, I've already set the user.name
and user.email
of git local config to yort account, but it always turned an error that Permission to yort/xxx.git
denied to troy when executing git push
.
I've tried many ways, only if I push it via https.git
could work. Anyone can help?
Below is the git local config list:
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
core.precomposeunicode=true
remote.origin.url=git@github.com:yort-xxx/xxx.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.feature/troy/backend.remote=origin
branch.feature/troy/backend.merge=refs/heads/feature/troy/backend
branch.feature/troy/backend_reflection.remote=origin
branch.feature/troy/backend_reflection.merge=refs/heads/feature/troy/backend_reflection
user.name=yort
user.email=yort.xxx@gmail.com
credential.helper=