We're a place where coders share, stay up-to-date and grow their careers.
Great article. There is an alternative to creating a SSH config file. Through your terminal you can tell any github repo to point to a particular ssh key file. just set sshcommand for that repo.
git -c core.sshCommand="ssh -i private_key_file" clone host:repo.git
git config core.sshCommand 'ssh -i private_key_file'
Cool! Do you know if there is a way to choose your SSH Key for use with git clone when first cloning the repo?
yes it is git clone -c core.sshCommand="ssh -i ~/.ssh/your-ssh-fileName" git@github.com:orgname/repo.git
git clone -c core.sshCommand="ssh -i ~/.ssh/your-ssh-fileName" git@github.com:orgname/repo.git
Great article. There is an alternative to creating a SSH config file. Through your terminal you can tell any github repo to point to a particular ssh key file. just set sshcommand for that repo.
git -c core.sshCommand="ssh -i private_key_file" clone host:repo.git
git config core.sshCommand 'ssh -i private_key_file'
Cool! Do you know if there is a way to choose your SSH Key for use with git clone when first cloning the repo?
yes it is
git clone -c core.sshCommand="ssh -i ~/.ssh/your-ssh-fileName" git@github.com:orgname/repo.git