-
Notifications
You must be signed in to change notification settings - Fork 129
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
Trouble cloning multiple private repositories from .repos file #807
Comments
Update for Issue 2I was able to solve the issue of cloning a single non-GitHub private repo in the Docker container by adding that repository's server to the This was fixed by issuing the following command immediately after the
After investigating the contents of the This solution should work for repositories hosted on any non-GitHub servers... just replace |
Update for Issue 1The root cause is due to the configuration created by webfactory/ssh-agent with the deploy key mapping feature. The custom .gitconfig settings are not copied into the docker automatically, therefore not allowing more than one private GitHub repo to be cloned. This can be resolved by passing both the A more permanent fix has been submitted as a PR to incorporate mapping these locations as part of the standard codebase. |
I'm having some trouble with this as well, but I haven't caught up with @TrevorGibson-SR yet. Basically I've followed the instructions in index.rst:
Except I have 4 private repositories, so I figured it might work to add 4 such private keys (with the corresponding public keys in the corresponding 4 private repos).
But, that doesn't work. |
@AndyZe: Just add something like this to your before_script in Lines 36 to 44 in 3ed9846
|
Just saw that you are talking about Github as well.. As @TrevorGibson-SR already pointed out: it is crucial to setup the known hosts properly. |
Multiple deploy keys should work with |
Hi all,
I've been trying to get a GitHub Actions CI build to work with cloning more than one private repository, but have run into multiple issues and can't seem to resolve them.
Overview
The current Action I have set up works fine specifically when only 1 private GitHub repository is listed in our
.repos
file. It breaks when either a second private GitHub repo is listed (issue 1), or any private BitBucket repositories are listed (issue 2).Some additional information:
vcs import
) works fine, regardless of the source of those repos (GitHub or BitBucket)Here is a snippet of the .yml action showing the steps being run (placeholders in place of actual repo URLs):
KEY1
,KEY2
, andKEY3
are action secrets defined in the main repository, and contain the private keys for the corresponding private repositories we want to clone.Issue 1: Action fails when cloning a second private GitHub repository
Prior to running the industrial CI step, I have an
ssh-agent
step to load the SSH keys and allow for cloning private repositories. The output from this step indicates that the keys are being scanned and added correctly. Additionally, I have added the repository links for the GitHub repos as comments for the keys to use the deploy key mapping feature of thessh-agent
action (actual keys/hashes redacted for security):However, during the cloning process in the industrial CI step, only the repository for the first key listed is successfully cloned. If I switch the key order in the .yml action file, the successfully clone repository changes as well. Failure output:
Issue 2: Action hangs when cloning any number of private BitBucket repositories
Similar to above, the
ssh-agent
step successfully loads the SSH keys prior to running the industrial CI step. When a private BitBucket repo is listed in the.repos file
, the action hangs during thecolcon_setup
portion and must be manually cancelled. It always hangs at the same point, prior to even attempting to clone the repos in the.repos
file. Output log:Summary
Any help with either of these issues would be greatly appreciated. Ideally I would like to use the BitBucket private repo as it works better with the larger project architecture. However, cloning multiple private GitHub repositories is also a must for another project, so resolving that one alone will be helpful as well.
Thanks in advance
The text was updated successfully, but these errors were encountered: