switcher-github.sh
is a tool that allows you to quickly switch between GitHub accounts, add new accounts, delete existing ones, and update account information.
A .deb
package is available for this tool, making it easy to use on Debian-based systems.
sudo dpkg -i switch-github-account-1.0.deb
switcher-github.sh
Alternatively, you can install the script manually:
cp switcher-github.sh /usr/local/bin/switcher-github.sh
chmod +x /usr/local/bin/switcher-github.sh
switcher-github.sh
When you run the script, you'll be prompted with the following options:
The script stores account information in a .github_accounts
file in your home directory.
The script stores usernames and email addresses in the $HOME/.github_accounts
file. The format of the file is as follows:
ACCOUNT1_NAME="username1"
ACCOUNT1_EMAIL="email1@example.com"
ACCOUNT2_NAME="username2"
ACCOUNT2_EMAIL="email2@example.com"
...
If you want to create a Debian package for this script:
mkdir -p switch-github-account-1.0/usr/local/bin
cp switcher-github.sh switch-github-account-1.0/usr/local/bin/
chmod +x switch-github-account-1.0/usr/local/bin/switcher-github.sh
DEBIAN
directory and add a control
file:
mkdir switch-github-account-1.0/DEBIAN
control
file:
Package: switch-github-account
Version: 1.0
Section: utils
Priority: optional
Architecture: all
Depends: bash
Maintainer: Your Name <your.email@example.com>
Description: A simple tool to switch GitHub accounts using a configuration file.
dpkg-deb --build switch-github-account-1.0
sudo dpkg -i switch-github-account-1.0.deb
We welcome contributions! If you have any suggestions or issues, please open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more details.