Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/harvey103565/git-multi-sshacc-asst
An oh-my-zsh plugin to help user manage multiple git account with different ssh keys per repo.
https://github.com/harvey103565/git-multi-sshacc-asst
Last synced: 2 months ago
JSON representation
An oh-my-zsh plugin to help user manage multiple git account with different ssh keys per repo.
- Host: GitHub
- URL: https://github.com/harvey103565/git-multi-sshacc-asst
- Owner: harvey103565
- License: mit
- Created: 2023-12-06T07:08:48.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2023-12-09T06:37:36.000Z (7 months ago)
- Last Synced: 2024-01-24T22:37:50.951Z (5 months ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-zsh-plugins - multi-sshacc - Manages multiple `git` with different `ssh` keys per repo. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - multi-sshacc - Manages multiple `git` with different `ssh` keys per repo. (Plugins / ZSH on Windows)
README
# git-ssh-helper
An oh-my-zsh assistant plugin for managing multiple git account with different ssh keys per repo.## [Function]
When there are multiple git(hub) accounts with different ssh key bound; It is often trivial to handle with the keys.
One approach is to access the remote repo via `GIT_SSH_COMMAND`, which would be like:
```bash
GIT_SSH_COMMAND="ssh -i /path/to/key/file" git pull origin xxx-branch
```
But if you do not want to type the environment variable every time, this plugin may help.
Each time when entering a folder which is a `git repo`, this plugin reminds you to set an unique ssh key per-repo. The next time when accessing remote repos, specified keys will be leveraged.## [Usage]
### Step 1:
Put ./git-ssh-helper/ folder under path: ${HOME}/.oh-my-zsh/custom/plugins/### Step 2:
Add plugin via .zshrc; inside the plugin section:> plugins=(... git-multi-sshacc-asst ...)
### Step 3:
Restart the shell or run `source ${HOME}/.zshrc'