This tool helps you easily switch between multiple GitHub accounts by automating login/logout using GitHub CLI and Git aliases.
Follow these steps to set up the Git Auth on your system:
To download the tool, clone the repository using the following command:
git clone https://github.com/priest-2105/git-auth.git
Navigate to the cloned repository and execute the setup script to configure everything:
cd git-account-switcher
bash setup.sh
Once the setup is complete, you can use the following commands to switch between GitHub accounts:
To login
git account-login
To logout
git account-logout
This will use the GitHub CLI to prompt for a login (either via web or the CLI directly).
Ensure that the following are installed and available on your system:
Git: The version control tool.
GitHub CLI (gh): Required for handling GitHub account logins.
Logout: Removes GitHub credentials from the Windows Credential Manager (or system credential storage).
Login: Initiates the GitHub CLI login process, allowing you to sign in to a different account.
Feel free to open issues or contribute to the project by submitting pull requests. We welcome any feedback or improvements!