gitid v0.2.0
GitID - Manage Multiple Git Identities Easily
GitID is a convenient command-line interface (CLI) that allows you seamlessly manage and switch between multiple git SSH identities on a single user account.
Caution: While this program works well, it is still work in progress. I recommend backing up your ~/.ssh directory before using this.
Installation
npm install -g gitidUsage
Here's how you can use the different commands of this CLI:
Create new identity:
This will create a new
ed25519SSH identity.gitid new <identity># example gitid new personalReplace
<identity>with the desired name for your new identity.List identities:
This will list all available identities.
gitid listCheck current identity:
This will output the current identity.
gitid currentUse identity:
This will change the Git identity for the repository in the current directory to a specified identity.
gitid use <identity># example gitid use personalReplace
<identity>with the name of the identity you want to use.Show public key:
This command fetches and displays the public key of a specified identity.
gitid show <identity># example gitid show personalReplace
<identity>with the name of the identity you want to show the public key for.This command reads the SSH config file, extracts the path of the corresponding
IdentityFilefor the specified identity, and then reads and prints the contents of the file. If the identity or the key file is not found, it will print an appropriate error message.
TODO
Option to set user.name and user.email in an identity
Optionally exclude user.name and user.email settings from an identity
Do I need GitID?
GitID is your solution if you are:
- Having a hard time managing multiple Git identity files on a single user account
- Struggling with permission issues when accidentally pushing from a wrong identity file
- Tired of having to modify git URLs every time you clone or add a new remote
Manual Installation and Contribution
First, clone the repository:
git clone https://github.com/inderdeepbajwa/gitid.git
cd gitidThen install the dependencies:
yarn installFinally, build the code:
yarn run buildNote
This CLI is meant for managing SSH identities on a single machine, the identity names you use are local to your machine and do not have to correspond to your actual GitHub username.
License
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago