Created
June 25, 2021 19:28
-
-
Save eacousineau/0642866e7acc0f396383b3b1c29c6362 to your computer and use it in GitHub Desktop.
Using separate github accounts and keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_DOTFILES=<DEFINE THIS> | |
use-personal-git() { | |
export [email protected] | |
export GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL} | |
export GIT_SSH=${_DOTFILES}/ssh_personal_for_git.sh | |
export PS1="personal!$ " | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
# Ensure this is executable! | |
# chmod +x ./ssh_personal_for_git.sh | |
# Setup | |
# ssh-keygen -f ~/.ssh/id_rsa_github_personal.pem | |
# xcopy < ~/.ssh/id_rsa_github_personal.pem.pub | |
# Add as new SSH key | |
pem_github_personal=~/.ssh/id_rsa_github_personal.pem | |
exec ssh -i ${pem_github_personal} "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment