Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/priest-2105/git-auth
a script to easily authenticate git with github
https://github.com/priest-2105/git-auth
auth authentication authorization bash cli git gitauth shell ssh
Last synced: about 1 month ago
JSON representation
a script to easily authenticate git with github
- Host: GitHub
- URL: https://github.com/priest-2105/git-auth
- Owner: priest-2105
- Created: 2024-09-09T02:43:42.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T03:37:24.000Z (5 months ago)
- Last Synced: 2024-10-31T10:04:53.582Z (3 months ago)
- Topics: auth, authentication, authorization, bash, cli, git, gitauth, shell, ssh
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Auth
This tool helps you easily switch between multiple GitHub accounts by automating login/logout using GitHub CLI and Git aliases.
## Setup Instructions
Follow these steps to set up the Git Auth on your system:
### 1. Clone this repository:
To download the tool, clone the repository using the following command:
```bash
git clone https://github.com/priest-2105/git-auth.git```
## Run the setup script:
Navigate to the cloned repository and execute the setup script to configure everything:
```bash
cd git-account-switcher
bash setup.sh
```## Use the following commands to switch accounts:
Once the setup is complete, you can use the following commands to switch between GitHub accounts:
To login
```bash
git account-login
```To logout
```bash
git account-logout
```This will use the GitHub CLI to prompt for a login (either via web or the CLI directly).
## Requirements
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.
## How It Works
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.
## Issues and Contributions
Feel free to open issues or contribute to the project by submitting pull requests. We welcome any feedback or improvements!