Skip to content

When checking out a repo on Github Actions workflow, how do I pass in a key for a private submodule but not the repo itself? #160503

You must be logged in to vote

I got it to work on Windows by doing the submodule checkout manually. I also had to register the ssh keys after the initial checkout because for some reason it couldn't pull the action repo. This is what I did...

jobs:
  build:
    # The type of runner that the job will run on
    runs-on: windows-2019
    timeout-minutes: 15

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      
      - uses: actions/checkout@v3
        with:
          persist-credentials: false

      - uses: webfactory/ssh-agent@v0.5.4
        with:
          ssh-private-key: |
            ${{ secrets.PULL_KEY_REPO }}
            ${{ secrets.PULL_KEY_SUBMODULE }}

      - run

Replies: 0 comments 33 replies

You must be logged in to vote
0 replies

You must be logged in to vote
1 reply
@cardoe

You must be logged in to vote
28 replies
@andrew-constantinescu

@sfullerbeckman

@sfullerbeckman

@sfullerbeckman

Answer selected by sfullerbeckman
@brunoferreiraobj

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Actions Checkout For discussions related to the actions/checkout action in GitHub workflows Transferred These are discussions that have recently Transferred from another org/repo
7 participants