I'm struggling with git/SSH multiple identities (one personal/work and one dedicated to yet another company)
I've managed to somehow create a virtual local "routing" thanks to https://simonbasle.github.io/2017/10/git-identities-and-ssh/, which selects the right SSH key depending on where the local repo is located on the disk. That's a first good step.
But I'm struggling to adapt my "gh" commands:
gh repo create REPO_NAME \
--template USER_NAME/TEMPLATE_NAME \
--private \
--clone
Doing this somehow successfully creates the REPO_NAME repository in the USER_NAME account, but then it fails at the "clone" step, with ERROR: Repository not found..
I believe that's because gh doesn't use the right SSH key, but I don't understand how to specify which one to choose from.
ghbut my understanding is that when it creates a repository, it uses the GitHub v3 API via https (only), even if it later uses ssh to clone the created repository. You might be best off usingghto create it, and thengit clonewith the adjusted URL as in the article you referenced. That is, yourgh repo createis not using ssh. By doinggit cloneyourself, rather than withgh, you can control the URL you supply.--cloneoption to work. I adjusted your tags to reachghexperts.