Menu

1 / 2

1Password, GitHub, and Git CLI with Multiple Users

DEV Community·Sean Boult·6 months ago
#pHh8wOhr
#github#cli#1password#tooling#work
Reading 0:00
15s threshold

Do you use the git , github , and 1password CLI? I do!

I want to be able to act as different users in certain directories to support my personal projects ( ~/code ) and my work projects ( ~/oss ) automatically, because, you know, developers automate everything.

This means I want to be able to run gh commands as the correct user, as well as have git commands pick the correct SSH key.

If you want to have a single dotfiles repo for both work and personal development, this should give you something to follow.

⚠️ If you use a single GitHub account for everything, this article might not be very helpful for you.

Prerequisites

Tools you’ll need to make all this work:

1Password CLI

Git CLI

GitHub CLI

You’ll also want to designate some folders to hold projects.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.