Multiple Accounts on one computer or merge?

I created a separate Github account from my main for a client project and have been doing their work in VS Code on my local machine. I did this as I thought it best to keep things separate, so that in the future if they want to use another developer I can just pass on that account to them.

However, back on my main account I’m trying to clone a private repo to my local machine, which isn’t being found presumably because my local machine still thinks I’m logged into the secondary account, which doesn’t have access to the repo.

Unless I’m mistaken, would a better approach have been to set up an organization for my client project using my main account? That way I wouldn’t need to create alternative github accounts for different clients?

To fix my screw up, should I transfer ownership of the client project back into my main account, then create an organization and move the client’s repo into that (If that’s possible?). Just want to make sure I’m not going to make things worse!

Thanks for any advice.

:wave: Welcome!

Yeah, git doesn’t play very well with multiple accounts. I know there are folks who manage it, but it’s a pain.

I think your best path would be to

  1. Create your organisation for your client project.
  2. Make the account you are keeping the owner and add the 2nd account as a member for now, making sure that members have repository creation permissions.
  3. Transfer the repository directly to the organisation.
  4. When you’re happy you have everything in order, delete that old account and check your configs to make sure you’ve set everything back to the one account.

With an organisation, you can always add your client as a member or owner, and you can even assign ownership to your company or the client company during the organisation creation process. This means that in the event that you lose access to your account, a representative of the owner company can ask us for ownership of the organisation.

Organisations also have much more granular permissions, making it safer and easier to work with clients.

1 Like

Thanks Canuckjacq! Great advice