A secure CLI tool for managing multiple GitHub accounts with SSH keys. Switch between work and personal accounts seamlessly! 🔐
- 🧩 Multi-Account Management - Store unlimited GitHub accounts
- 🔒 Secure Storage - Automatically handles SSH key permissions
- 🚀 Context-Aware Operations - Clone/push with active account credentials
- 📋 Interactive Setup - Guided account creation process
- 🌐 Cross-Platform - Works on Linux, macOS, and Windows
cargo install --git https://github.com/rohansen856/gitshift.git# Nightly required or edition2024 support
cargo +nightly install gitshift - Add New Account
gitshift add --name work --algorithm ed25519- List Accounts
gitshift ls- Activate Account
gitshift activate work- Clone Repository
gitshift clone [email protected]:company/project.git~/.config/gitshift/
├── config.json # Account configurations
├── state.json # Active account state
└── ssh_keys/ # SSH key storage (700 permissions)[
{
"name": "work",
"email": "[email protected]",
"ssh_key_path": "~/.config/gitshift/ssh_keys/work_id",
"public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1..."
}
]Command | Description | Example add | Create new account | gitshift add ls | List accounts | gitshift ls activate | Switch account | gitshift activate personal clone | Clone repository | gitshift clone [email protected]:user/repo.git info | Show account details | gitshift info work
git clone https://github.com/rohansen856/gitshift.git
cd gitshift
cargo build --releaseQ: Getting "Permission denied" when cloning A:
-
Verify active account: gitshift ls
-
Check GitHub SSH setup: ssh -T [email protected]
-
Confirm key permissions: ls -la ~/.config/gitshift/ssh_keys
Q: Error saving configuration A: Ensure proper directory permissions:
chmod 700 ~/.config/gitshift