Skip to content

An oh-my-zsh plugin to help user manage multiple git account with different ssh keys per repo.

License

Notifications You must be signed in to change notification settings

harvey103565/git-multi-sshacc-asst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

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:

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'

About

An oh-my-zsh plugin to help user manage multiple git account with different ssh keys per repo.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages