Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment key mapping not working with vcstool (from dirk-thomas/vcstool) #99

Open
ericluwj opened this issue Sep 23, 2021 · 1 comment

Comments

@ericluwj
Copy link

I have created 2 sets of ssh keys + github deploy tokens so that my main git repo github action workflow can clone 2 other private git repos.
However, 1 private repo could be cloned while the other could not.

Run webfactory/[email protected]:

Key(s) added:
256 SHA256:T352v3BwjjmEpVfq5D/p4YOIsszvXNhIKG7ZwuAyGDY [email protected]:asdf/aws-robotics-rosbag-uploader-ros1.git (ED25519)
256 SHA256:J7ESlzcWidq7HPE230ntxFjgn0q0Niz1GVKDmxWSp+Y [email protected]:asdf/aws-robotics-utils-common.git (ED25519)
Configuring deployment key(s)
Added deploy-key mapping: Use identity '/home/runner/.ssh/key-42ab39475dd17224c2a41707a74ac2f1fdac2e8dc2abf3518e365119422b5c17' for GitHub repository asdf/aws-robotics-rosbag-uploader-ros1
Added deploy-key mapping: Use identity '/home/runner/.ssh/key-049256e68ad1237c709c594734af12b208c23e67a38e5e493d53bdc81a911495' for GitHub repository asdf/aws-robotics-utils-common

However, with command vcs import --recursive --force /home/runner/work/vcc-ros/vcc-ros/.work/upstream_ws/src:

=== /home/runner/work/vcc/vcc/.work/upstream_ws/src/aws-robotics-rosbag-uploader-ros1 (git) ===
  Warning: Permanently added the RSA host key for IP address '192.30.255.113' to the list of known hosts.
  Already on 'main'
  Your branch is up to date with 'origin/main'.
  
  === /home/runner/work/vcc/vcc/.work/upstream_ws/src/aws-robotics-utils-common (git) ===
  Could not determine ref type of version: Warning: Permanently added the RSA host key for IP address '192.30.255.112' to the list of known hosts.
  ERROR: Repository not found.
  fatal: Could not read from remote repository.

It is noted that the 2nd repo failed to be downloaded via git clone.
The branch has been double checked.

@mpdude
Copy link
Member

mpdude commented Nov 18, 2021

There have been other issues (see #74 or #63 for examples) in the past when other tools than git try to clone repos, and these don't follow the .gitconfig configuration that is necessary to map deployment keys to repos.

What you can do to check:

After you ran this action here in your workflow, add a run step and try to git clone ...your-first-repo... and then git clone ...your-second-repo....

If that works (git can clone both), your key setup and deployment-key mapping works fine ✔️ , the issue then lies within the tool you're using.

I don't know what vcs import is or does. You'd need to find out if it brings its own git client under the hood or if it can be switched to using the system-provided git command.

Maybe the examples/caveats documented in the README for other platforms (here: https://github.com/webfactory/ssh-agent#additional-information-for-particular-tools-or-platforms) help you?

@mpdude mpdude changed the title Multiple private repos not working Deployment key mapping not working with vcstool (from dirk-thomas/vcstool) Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants