-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Labels
kind/enhancementEnhancement to existing featureEnhancement to existing featurepriority/needs-triageNice to haveNice to have
Description
Checks
- I have searched the existing issues.
Motivation
Overview:
- common situation when we have multiple accounts: company, personal, provided.
Problem:
- setup which SSH key git repo should use for pushing the changes in easy way
Solution:
- setup multiple SSH keys
- re-configure git repo
core.sshCommandand git remote so git start to use a correct SSH key for common operations
# different approaches
git config --global core.sshCommand "ssh -i /path/to/key"
git config --local core.sshCommand "ssh -i /path/to/key"
git submodule foreach git config core.sshCommand "ssh -i /path/to/key"
git config core.sshCommand "ssh -o IdentityAgent=none -i $HOME/.ssh/id_rsa_example -F /dev/null"
# or setup GIT_SSH_COMMAND env variableReferences:
- https://blog.prag.dev/telling-git-how-to-use-ssh-nicely
- https://stackoverflow.com/questions/57657130/how-to-propagate-the-core-sshcommand-option-to-submodule-update
- https://docs.github.com/en/authentication/connecting-to-github-with-ssh
- https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables
- https://superuser.com/questions/232373/how-to-tell-git-which-private-key-to-use
Implementation
- If lazyssh executed from git repo folder, we should ask user does he/she needs to reconfigure git repo SSH key or not
- support keychain (https://github.com/danielrobbins/keychain) for automatic loading of SSH keys (ref: https://www.funtoo.org/Funtoo:Keychain)
Are you willing & able to help?
- I am able to submit a PR!
- I can help test the feature!
OleksandrKucherenko
Metadata
Metadata
Assignees
Labels
kind/enhancementEnhancement to existing featureEnhancement to existing featurepriority/needs-triageNice to haveNice to have