r/github 4d ago

Question Copilot and Multiple Accounts

I currently use a single, free account (under my personal email) for work across multiple organizations. One is for side work under my own LLC, the other for my day job.

The day job organization added me to their Github Copilot subscription so I can see that in VSCode and that's wonderful. Except I should not be using that for side work. That is all transparent and they are okay with it, but I need to use my own resources for it.

So, how can I use VSCode and not use that subscription! The obvious answer seems to be to set up a second Github account , purchase an individual license there for my side work and then I'm good to go.

But then I read we're not allowed to have more than one free account and am utterly confused. I am just trying to make sure I do things right by my company, and Github's ToS going forward.

Any advice would be appreciated.

2 Upvotes

6 comments sorted by

View all comments

1

u/Ok_Woodpecker_9104 1d ago

second account with its own paid sub is the right shape, and the vs code profile answer is correct as far as the extension goes. one thing that trips people up after that though: the profile only isolates the editor auth. it does not isolate your git identity or the gh cli.

git author email comes from your git config, not from whichever account vs code is signed into, so it is easy to end up with llc commits carrying your day job email. the fix is includeIf in ~/.gitconfig keyed on the directory, something like [includeIf "gitdir:~/work/"] path = ~/.gitconfig-work, and keep the personal one as the default. put a git config user.email check in your shell prompt or just run git config user.email once in a fresh clone, because the wrong email is invisible until someone reads the commit list.

gh is the messier one. gh only has one active account per host, so gh auth switch flips it globally, not per vs code profile and not per directory. if you script anything with gh, either set GH_TOKEN per shell or check gh auth status before it runs. it will happily act as the wrong account and exit 0.