emil
Wed Sep 27 2017
Sometimes we may need to create a new github/bitbucket account for a new client project. Because we've already linked out laptop's SSH key to our original account, we can't link it again to this new account. In such cases, instead of using tools to switch ssh keys, you can generate a keypair just for this project and set an environment variable GIT_SSH_COMMAND='ssh -i new_ssh_keys_dir/id_rsa'
and run git commands like usual. Bonus tip: Use direnv to automatically load this environment variable when navigating to the project directory.