DEV Community

Cover image for Managing multiple github accounts on your machine
Navin Kodag
Navin Kodag

Posted on • Edited on

3

Managing multiple github accounts on your machine

All of us have and might go through this problem at some point in our careers where we've got multiple github account for our personal, work and freelancing projects.

Before a couple of months ago I would used two variations of VS code in my machine. One was the Visual Studio Code and other was VScodium .
But that was a work around until I found out that you can add your username and password/ Personal Auth Token when you clone the repo. After that you can start working normally and git will take care of permissions.
We need the Personal Auth Token because github has discountinued using our traditional passwords. And PATs can expire, they can also be given selective permissions.

So this is how it works, when you're cloning a repo just put your username:PAT
example:

git clone https://{username}:{PAT}@github.com/{username/org}/{repo}
Enter fullscreen mode Exit fullscreen mode

Yes, it was as simple as that.

You can find me at https://100lvlmaster.in

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs