panthro
panthro

Reputation: 24061

Do I need two GitHub accounts for this?

I have a GitHub user account that I use for work.

I wish to upload some code that I have written outside of work and make public. Is there a way to mask my username from the public, so work could not see it was me?

Or would I need to create a separate account to upload the code?

Upvotes: 7

Views: 3812

Answers (3)

Suma
Suma

Reputation: 34403

You can create a (public) organization which can own your open source repositories. If you want, you can hide the fact the organization is yours: Publicizing or hiding organization membership. It seems your membership is hidden (private) by default.

As for commit identification, you can use any email you have control of - the drawback is the commits will not be identified as yours when browsing the in the GitHub web.

This has also an advantage you can share or transfer ownership of those open source projects to another user by simply making somebody else an owner.

If you wish you can create multiple organizations, say for logical groups of your projects, or for each project in extreme case.

Upvotes: 0

jub0bs
jub0bs

Reputation: 66244

See the top of the GitHub help page called What's the difference between user and organization accounts?:

Your user account is your identity on GitHub.

Therefore, if you don't want your workplace to be able to identify that you're the author of some personal (i.e. non-work-related) stuff that you've made public, you need to create and use a different GitHub account for that personal stuff.

For instance, use an account called panthro_at_work for work-related repositories and another account called mystery_man_or_woman for your personal stuff.

However, also be aware that

One person or legal entity may not maintain more than one free account.

See Account terms and also nulltoken's answer. Therefore, in order to hold two accounts, at least one of them should be a paid account.

Merging accounts

Should you change your mind (at a later stage) about keeping work and personal stuff separate, GitHub allows you to merge your two user accounts; see Merging multiple user accounts.

Transferring repositories between accounts

GitHub allows for even more fine-grained actions than that: you can transfer ownership of only a subset of your repositories in your mystery_man_or_woman account to your panthro_at_work account (or vice versa); see How to transfer a repository.

Upvotes: 6

nulltoken
nulltoken

Reputation: 67599

I wish to upload some code that I have written outside of work and make public. Is there a way to mask my username from the public, so work could not see it was me?

Any activity performed against a public repository is also public. For instance, the public activity for the user Octocat can be seen at the following url https://github.com/octocat?tab=activity

Or would I need to create a separate account to upload the code?

I would advise you to take a also take a look at the GitHub Terms of Services which specifically states: "One person or legal entity may not maintain more than one free account."

So, although the system does allow one to create multiple accounts, GitHub legally reserves the right to ban you, at its own discretion:

  • "Violation of any of the terms below will result in the termination of your Account."
  • "The failure of GitHub to exercise or enforce any right or provision of the Terms of Service shall not constitute a waiver of such right or provision."

Upvotes: 5

Related Questions