I suddenly felt a deep connection with the author. It is not only me.
I promise you, my dear drafts, that one day, I will set you free to see the world!
41–50 of 113 posts
I suddenly felt a deep connection with the author. It is not only me.
I promise you, my dear drafts, that one day, I will set you free to see the world!
Just keep a .gitconfig in your HOME with aliases for your identities. Then just after initializing/cloning the repo do git config-company or git config-personal
er453r@r7:~$ cat ~/.gitconfig
[user]
useConfigOnly = true
[alias]
config-personal = !echo CONFIG-PERSONAL && \
git config --local user.email 'personal@email.com' && \
git config --local user.name 'personal' && \
git config --local core.sshCommand 'ssh -i ~/.ssh/id_rsa_personal'
config-company = !echo OLD CONFIG-COMPANY && \
git config --local user.email 'official@comapny.io' && \
git config --local user.name 'Name Surname' && \
git config --local core.sshCommand 'ssh -i ~/.ssh/id_rsa_company'Is there a risk with not using different keys for work and personal? The private bits are all in the same place: if one is compromised, so are the rest.
Why have multiple git identities in the same machine? I use a single different key with each machine and that's it.
Even if I'm in my work profile and I need to do something in an org called `acmecorp`, I will create @acmecorp-identifier to do that.
This is just a very long experience...
* Security policies for work things have a blast radius of just that employer
* OSS things have a lifetime beyond the life of an employment / contract
* Source control elsewhere (GitHub / GitLab / Bitbucket / Gitea / Forgejo / etc) all has a local blast radius, and if a provider / org forces changes (roll your keys!) then the impact is limited to just that provider
* When something changes ownership (i.e. an org), the impact to me is low
It seems much more sane.
I think of a single git identity across multiple orgs as a bit of a smell.
Based on that and your 1.44MB Club, you might find Neat CSS interesting. :P
My Neat CSS websites will almost always fit on a floppy and I have a case of old floppies right here in my closet. The Neat CSS home page is only about 12k. Things get bigger when you start adding images, of course.
Did you say that just so we could imagine the world where you published it earlier?
Thanks anyway, and nice site!
You’re risking putting yourself in a whole lot of trouble by using a personal machine for work.
Thank you for this! I have exactly the same problem and was waiting for the solution to present itself, which it now has. Aside: I use NixOS with home-manager (on linux and mac), which makes this trivial [1]. Added the following lines to my home-manager config: programs.git = { enable = true; ... includes = [ { condition = "hasconfig:remote.*.url:git@github.com: /**"; contents = { user.email = " "; }; } ]; } [1]: htt…
It was super unhelpful when trying to do version control forensics. But if I'm being generous, I think maybe he was trying to remind everyone that anyone can put anything in their identity config, and we shouldn't trust whatever is in there for all that much.