I have the setup of two githab accounts in the same computer using SSH keys.
I email to the - global
user name and the first account, then I created a repository in my second account, but when I pushed the repo, the user who committed Was the first account related to the user, using this global email, the reason I was using.
Is there a way to set user.name
and user.email
depending on the SSB key being used?
I have removed the global setting now and have put the local in my reps but every time there may be a way to avoid setting local emails for every report. / P>
You can simply configure user.name and user.email in your other account in your local repost. :
cd / path / from / my / local / repo GIT configuration user.name secondName GIT configuration user. Email second addmail git. Git commit -m "Commitment with the second account" git push
Local configuration will overwrite the global config.
Note: The SSP key used to push is completely different from the user.name used for the key or URL commit.
Comments
Post a Comment