6 ms·
I'm really surprised at the number of personal GitHub accounts that are being used in my org and at others. I guarantee their access isn't being removed when th
by MattGaiser 5y ago
I'm really surprised at the number of personal GitHub accounts that are being used in my org and at others. I guarantee their access isn't being removed when they depart.
And it seems common at a ton of companies.
- kondro 5y agoBecause GitHub makes it hard (i.e. impossible) to manage multiple accounts. No account switching on the website, no easy way to use multiple SSH keys to access multiple accounts when using Git.
- MattGaiser 5y agoShouldn't you mostly be using them on separate computers though? The rare times I need my personal one at work (to view how I solved something before), I just open Incognito.
- SturgeonsLaw 5y agoObligatory plug for Firefox Containers
- kondro 5y agoI'm self-employed and always on-call. Not suggesting this is the right way for anyone else, but trying to unravel a combined life to even multiple accounts on a single computer sounds like a nightmare.
- lokedhs 5y agoThis is one of those times where Qubes OS makes these things so much easier. It allows you to easily split everything between the different roles.
- powersurge360 5y agoYou can set up a new host in your ssh config and specify a key different from your main account and it should swap your accounts based on the key. Additionally, you can set a git config to be included if you’re in a particular directory so that you can change your commit details. I’m on a mobile device so excuse the vagueness, but if there’s interest I can provide some resources and go more in depth.
- kondro 5y agoA new host with what hostname? Because git uses github.com for all repos.
- fnord77 5y agoput this in your ~/.ssh/config Host personal.github.com HostName github.com User git IdentityFile ~/.ssh/id_rsa_personal then clone from git@personal.github.com/x.git for personal stuff
- powersurge360 5y agoThe host also doesn’t have to be a “real” host. You could do something like github-personal for example. Thanks for the assist fnord77!
- renerthr 5y agoNewbie here. Where should I type `github-personal` ?
- powersurge360 5y agoIn the example, fnord77 posted, you can replace all the places that they used personal.github.com. It will be usable anywhere you would use ssh, including when going through a few tools that ultimately resolve to an ssh invocation. I won't copy the host block in .ssh/config but you could, for example: `sshuttle -r my-cloud-server 0/0` for a poor man's vpn `ssh some-enterprise-server` for when the server has a user unfriendly domain name that you don't want to bother remembering `git clone git@github-personal:myusername/somerepo.git` when you want to clone using your personal key from GitHub. There is the caveat, though, that you may have some nested dependencies that will use the plain ole every day host name in which case things will break for you. It rarely comes up, though, in my experience.
- stjohnswarts 5y agoWhy should they? All that stuff is easily managed locally under your own control.
- eurasiantiger 5y agoWhat the hell? Everything you claim is false.
- ploxiln 5y agoGitHub actually manages attaching business org to personal accounts very well. You can make notification emails related to the business org repos go to your work email, while all other notification emails go to your personal email. When you fork a business org private repo into your account, it stays attached to the business org. Other members of the org can push to your fork of that repo but not your other personal or open-source repos. When your account is separated from the org, you lose access to your fork. If the business org requires extra SAML/OIDC through their central auth service, you can still access your personal and public repos without doing it. So yeah the business still has to remember to disconnect you from the org when you leave the company, but that's still true if you make a new github account anyway?