ssh-agent
ssh-agent copied to clipboard
ssh-agent is not working properly with msys2/setup-msys2
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/[email protected]
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 }} ..
Maybe it has to do with shell: msys2 {0}? Just a wild guess.
Can anybody help?
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 ...