Is it possible to use deploy keys and ssh configured hosts in a .rosinstall?

asked 2017-04-20 17:09:40 -0600

nckswt gravatar image

I'm using deploy keys to provide a build server with access to a few private git repos, and I'd like my .rosinstall file to easily clone them.

I've configured ssh like the following:

# ~/.ssh/config
Host private_repo_a
    HostName github.com
    IdentityFile ~/.ssh/id_rsa.private_repo_a
    StrictHostkeyChecking no
    User git

Host private_repo_b
    HostName github.com
    IdentityFile ~/.ssh/id_rsa.private_repo_b
    StrictHostkeyChecking no
    User git

Now, using these Host values, I can git clone private_repo_b:fake_org/private_repo_b.git and git will automatically use the private part of my deploy key to clone the repo securely.

However, I don't think it's possible to use these Host values inside of a .rosinstall, as in the following:

# catkin_ws/secure.rosinstall
- git:
    local-name: private_repo_a
    uri: private_repo_a:fake_org/private_repo_a.git
- git:
    local-name: private_repo_b
    uri: private_repo_b:fake_org/private_repo_b.git

The problem is that private_repo_b is taken as a local path rather than as a Host configuration, so my wstool init src secure.rosinstall command fails with something like the following:

ERROR in config: Error processing 'private_repo_b' : [private_repo_b] Checkout of /home/nick/catkin_ws/src/private_repo_b:fake_org/private_repo_b.git version devel into /home/nick/catkin_ws/src/private_repo_b failed.

Since the Host values specify to the private deploy keys, this makes me thing it might not be possible to use deploy keys with rosinstall. Has anyone had success with this method?

edit retag flag offensive close merge delete

Comments

I don't recognize that form of git URI that you're using; have you tried the variation of remote URI with git@ on it?

ahendrix gravatar image ahendrix  ( 2017-04-20 18:40:04 -0600 )edit

Yup! I've tried that, same problem.

nckswt gravatar image nckswt  ( 2017-04-20 21:23:19 -0600 )edit