3 ms·
I similarly have multiple git accounts and repos. When I clone a repo i do so via SSH. When I am in the folder of one repo (say a GitHub.com repo) then the ssh
by angrais 4y ago
I similarly have multiple git accounts and repos. When I clone a repo i do so via SSH. When I am in the folder of one repo (say a GitHub.com repo) then the ssh account that cloned the repo is used.
I'm not near my laptop, but it's two lines of code in the SSH config files and that's it.
Does anyone follow a similar pattern?
- thewavelength 4y agoPlease provide these two lines, I'd love to utilize the same pattern in the future :)
- rgoulter 4y agoStuff in ~/.ssh/config which complements the git config in OP: Host foo.bitbucket.org HostName bitbucket.org User git IdentityFile ~/.ssh/foo_id As in, for using bitbucket.org with the private key ~/.ssh/foo_id, you'd instead clone from foo.bitbucket.org:owner/repo.