I have forge accounts from three respective sites: GitHub, GitLab and Codeberg. In all of these forges, I’ve opted to use secret e-mail. The reason for this is that when I had my original e-mail, I was spam-bombed job roles by a company from Shanghai within the Linux foundation, called Zilliz. Apparently, they extracted emails from git patches or something, I don’t know much about it.

I want it to be configured, such that when I clone projects from respective sites, I will use their respective secret emails. However, the issue with this is that it is only configured for SSH, and not HTTPS-based URL - when I forget to fork and clone, and instead directly clone the repo from where it originally was, that is where I start to have problems - I can no longer commit, because I did not associate HTTPS URLs with an e-mail. I could, but the git config becomes really messy.

So far, I’ve come up with a setup that makes use of the if-clause supported by git. But the worst thing about configuring this is that it is so damn painful - I have to setup three different SSH keys, followed by setting up the config, and then also make sure that the keys are working for each sites individually, as well as check that the if-clause is working properly for email. Finally, I also have to create another set of SSH keys for signing commits, and at last, a allowed signer’s file so that I can verify my own commits locally, all of this process is so damn frustrating. And again, the same mess on another desktop.

Is there an easier way to go about this?