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

cmake_ctest.yml : fails to clone private submodule #58

Closed
mikelange49 opened this issue Oct 24, 2023 · 2 comments · Fixed by #65
Closed

cmake_ctest.yml : fails to clone private submodule #58

mikelange49 opened this issue Oct 24, 2023 · 2 comments · Fixed by #65
Labels
documentation Improvements or additions to documentation

Comments

@mikelange49
Copy link
Contributor

Hi

I'm trying to add a submodule from a private repo.
This submodule, as well as my pamplejuce project, are in a github organization.

cmake_ctest.yml action fails on cloning that repo :
remote: Repository not found.

For now I'm trying to fix it using webfactory/ssh-agent
If I succeed, I'll post here.

Meanwhile, if anyone has already done it, please share.

@mikelange49
Copy link
Contributor Author

This worked for me :

I replaced

    - name: Checkout code
      uses: actions/checkout@v3
      with:
        submodules: true # Get JUCE populated

with

    - name: Checkout code (no submodules)
      uses: actions/checkout@v3

    - name: Add SSH private keys for submodule repositories
      uses: webfactory/[email protected]
      with:
        ssh-private-key: |
          ${{ secrets.PRIVATE_REPO_1_SECRET }}
          ${{ secrets.PRIVATE_REPO_2_SECRET }}

    - name: Update submodules
      run: git submodule update --init --recursive

Useful help :

https://stackoverflow.com/questions/57612428/cloning-private-github-repository-within-organisation-in-actions/70283191#70283191

https://github.com/webfactory/ssh-agent#support-for-github-deploy-keys

actions/checkout#287 (comment)

@sudara
Shall I close the issue ?
Or would you like to try it and update cmake_ctest.yml if it works ?

@sudara
Copy link
Owner

sudara commented Oct 24, 2023

Glad you figured it out!

Let's leave this open for now. I'll tag it for some improved documentation I'm thinking about writing. The only other way I can think of including it in the repo is to have a commented out example (unideal for the main yml).... I am thinking about breaking apart the yml similarly to the cmake though...

@sudara sudara added the documentation Improvements or additions to documentation label Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants