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

ssh-agent is not working properly with msys2/setup-msys2 #149

Open
mojca opened this issue Nov 8, 2022 · 2 comments
Open

ssh-agent is not working properly with msys2/setup-msys2 #149

mojca opened this issue Nov 8, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@mojca
Copy link

mojca commented Nov 8, 2022

I cannot get the ssh-agent working in combination with https://github.com/msys2/setup-msys2

Cloning into 'private-repository-I-fetch-via-cmake-fetchcontent'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Example workflow:

name: Test

on:
  push:

jobs:
  build-mingw-windows:
    runs-on: windows-2022
    name: Windows MinGW Clang

    strategy:
      matrix:
        include:
          - cmake_generator: Ninja
            cmake_defines: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
            mingw_msystem: mingw64
            mingw_env: x86_64

    # didn't work as advertised
    #defaults:
    #  run:
    #    shell: msys2 {0}

    steps:
      - name: Setup MinGW, install dependencies
        uses: msys2/setup-msys2@v2
        with:
          update: true
          msystem: ${{ matrix.mingw_msystem }}
          # not sure which ones are really needed
          install: >-
            git
            ninja
          pacboy: >-
            cmake:p
            clang:p

      - name: Checkout
        uses: actions/checkout@v3

      - uses: webfactory/ssh-agent@v0.7.0
        with:
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

      # requires some private dependencies via CMake's FetchContents
      - name: Configure
        shell: msys2 {0}
        run: |
          mkdir build
          cd build
          cmake -G "${{ matrix.cmake_generator }}" --preset ${{ env.cmake_preset }} ${{ matrix.cmake_defines }} ..
@mojca mojca changed the title ssh-agent now working properly with msys2/setup-msys2 ssh-agent is not working properly with msys2/setup-msys2 Nov 8, 2022
@mpdude
Copy link
Member

mpdude commented Jan 27, 2023

Maybe it has to do with shell: msys2 {0}? Just a wild guess.

Can anybody help?

@mpdude mpdude added the help wanted Extra attention is needed label Jan 27, 2023
@wblessen
Copy link

wblessen commented Mar 2, 2023

The error message seems to say that the Keys are not properly set up:

Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Maybe try first, if they are ok ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants