This is all you need:
- Add ssh keys of both users
Make both users use the same
user.name
anduser.email
:git config --global user.name "Your Name" git config --global user.email you@your.domain.com
Well, for the user who has to set not his real name and email, a global setting will be too inconvenient. It will be better to make the setting only in the repository in question. You can do that by running these commands inside the working tree of the repo without the --global
flag:
git config user.name "Your Name"
git config user.email you@your.domain.com
With this setup, GitHub won't be able to tell the difference between the two different users. It will appear as if it's the same person using multiple ssh keys.
If you think you need this to work with private repositories, then you don't need this. The fork of a private repository will be private too.