nanobox
nanobox copied to clipboard
Enhance multiple ssh key use
If a user has multiple ssh keys/users on github (or equivalent). It matters which one nanobox uses first.
Use Case
Suppose a user has two users (userA and userB) on github. They each have a key associated: keyA and keyB. Each app has a private repo: appA and appB. Currently, all keys are listed in the ~/.ssh/config file (in alphabetical order). When the user tries fetching appB during his build, it will fail since keyA is a valid key on github but doesn't have access to appB.
Proposed Solutions
- Allow/add per-app setting of an ssh key to use, rather than the current nanobox global setting.
- Import/use portions of the user's
~/.ssh/configfile. One potential drawback could be keyfile locations.
I'm experiencing this issue right now. I have API components stored with one use in Github as private repos, and apps using those API components stored in private repos of another user.
I'm not sure how to get around this problem, it's preventing me from building boxes, do you have a work-around?
Actually, yes. Add a deploy key to both accounts. This will enable pull access without enabling push.
Deploy keys are per repo and user agnostic, repo specific. It will probably work, but I would have to add some 50 deploy keys for all my private repos. Github suggests creating a deployer account, and making it a collaborator on each repo. I took that approach, but I have two accounts with private repos, hence the issue.
Follow up, Just tried using deploy keys on a couple of repos and it didn't work. I think the same problem as described by @glinton still exists. When I call nanobox run it just sits there spinning away on:
Installing binaries and runtimes :
Fetching https://github.com/.../....git
I have to break out of the command to stop it.