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

Submodule update fails with Host key verification failed #454

Open
arihannu opened this issue Mar 5, 2021 · 1 comment
Open

Submodule update fails with Host key verification failed #454

arihannu opened this issue Mar 5, 2021 · 1 comment

Comments

@arihannu
Copy link

arihannu commented Mar 5, 2021

We have a private repository which has many submodules, which are in our corporate git servers. We have self hosted runners which do the checkout. Every time when one of those submodules need to be updated (new commits), pull fails with Host key verification failed. ~/.ssh/known_hosts file must be correct, because when I run git submodule update locally on the same runner, there are no issues. It seems like known_hosts is not even read or something else is wrong. Here is the checkout action:

- uses: actions/checkout@v2
      timeout-minutes: 30
      with:
        token: ${{ secrets.CI_TOKEN }}
        lfs: true
        submodules: recursive

We have also many submodules which are in github.com, with which we have never trouble. Only with the ones which are outside of Github and have url ssh://server...

Could it be that checkout action does not respect user's known_hosts file since modifying it seems to have absolutely no effect?

@arihannu
Copy link
Author

We have put a workaround until this issue is resolved:
First we disabled submodules from actions/checkout.

After the checkout, we run a step which updates the submodules:
...
run: |
git submodule sync --recursive
git submodule update --init --recursive --force
git submodule foreach --recursive

Works great.

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

1 participant