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? #928

Discussion options

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: 3 comments 28 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cardoe
Comment options

Comment options

You must be logged in to vote
27 replies
@andrew-constantinescu
Comment options

@sfullerbeckman
Comment options

@sfullerbeckman
Comment options

@sfullerbeckman
Comment options

Answer selected by sfullerbeckman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants