diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 1776189397a648827a090605cccd4b4f8ff54829..450ff34232ef0d634604b52099641bfa450813be 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -30,7 +30,7 @@ jobs:
     - name: Build and install the python wrapper
       # Build your program with the given configuration
       # run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
-      run: git submodule update --init --recursive && python setup.py build && python setup.py install
+      run: git config --global --add safe.directory /__w/bgslibrary/bgslibrary && git submodule update --init --recursive && python setup.py build && python setup.py install
 
     - name: Compile the C++ QT User Interface
       # Build your program with the given configuration