nanobox icon indicating copy to clipboard operation
nanobox copied to clipboard

Enhance multiple ssh key use

Open glinton opened this issue 8 years ago • 4 comments
trafficstars

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/config file. One potential drawback could be keyfile locations.

glinton avatar Sep 18 '17 16:09 glinton

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?

jocubeit avatar Dec 15 '17 06:12 jocubeit

Actually, yes. Add a deploy key to both accounts. This will enable pull access without enabling push.

danhunsaker avatar Dec 15 '17 06:12 danhunsaker

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.

jocubeit avatar Dec 15 '17 07:12 jocubeit

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.

jocubeit avatar Dec 15 '17 09:12 jocubeit