I’m currently setting up my first repository on my self-hosted Gitea instance using submodules contained in the instance.
Azure DevOps generally doesn’t have an issue with this, but Gitea apparently does.
At first my repository pulled the repo (in the same org as the parent repo) via CPM, but that didn’t work in the runner.
I got this error:
[ 11%] Creating directories for 'procsys_utils-populate'
[ 22%] Performing download step (git clone) for 'procsys_utils-populate'
Cloning into 'procsys_utils-src'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Cloning into 'procsys_utils-src'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Cloning into 'procsys_utils-src'...
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
-- Had to git clone more than once: 3 times.
CMake Error at procsys_utils-subbuild/procsys_utils-populate-prefix/tmp/procsys_utils-populate-gitclone.cmake:39 (message):
Failed to clone repository:
'ssh://gitea@<me>/<ORG>/procsys_common.git'
As I said, the repo structure is as follows:
PARENT_ORG/
PARENT
CHILD
So instead I removed the reference from CPM and added it as a git submodule.
This is a tried-and-true method. Or so I thought.
.gitmodules:
[submodule "submodules/procsys_common"]
path = submodules/procsys_common
url = ssh://gitea@<me>/<ORG>/procsys_common.git
However, no matter if I try actions/checkout@v4/v3 or set different options, it always ends up in an error like the following:
Fetching submodules
[command]/usr/bin/git submodule sync --recursive
[command]/usr/bin/git -c protocol.version=2 submodule update --init --force --depth=1 --recursive
Submodule 'submodules/procsys_common' (ssh://gitea@<me>/<ORG>/procsys_common.git) registered for path 'submodules/procsys_common'
Cloning into '/workspace/<ORG>/<PROJECT>/submodules/procsys_common'...
Permission denied, please try again.
Permission denied, please try again.
Received disconnect from <IP> port <PORT>:2: Too many authentication failures
Disconnected from <IP> port <PORT>
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'ssh://gitea@<me>/<ORG>/procsys_common.git' into submodule path '/workspace/<ORG>/<PROJECT>/submodules/procsys_common' failed
Failed to clone 'submodules/procsys_common'. Retry scheduled
Cloning into '/workspace/<ORG>/<PROJECT>/submodules/procsys_common'...
Permission denied, please try again.
Permission denied, please try again.
Received disconnect from <IP> port <PORT>:2: Too many authentication failures
Disconnected from <IP> port <PORT>
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
fatal: clone of 'ssh://gitea@<me>/<ORG>/procsys_common.git' into submodule path '/workspace/<ORG>/<PROJECT>/submodules/procsys_common' failed
Failed to clone 'submodules/procsys_common' a second time, aborting
::remove-matcher owner=checkout-git::
::error::The process '/usr/bin/git' failed with exit code 1
I have setup a specific gitea
user with an SSH key and set it up in the runner.
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
ssh-key: ${{secrets.PROCSYS_SSH_KEY}}
ssh-user: gitea
Following step prepares the build:
- name: Prepare Run
run: |
sudo apt update
sudo apt install cmake g++-10 make build-essential nodejs doxygen graphviz npm -y
sudo npm -g install quicktype
ssh-keyscan -p <PORT> -t ed25519 <me> >> ~/.ssh/known_hosts
git config --global --add url.https://<me>:3000/.insteadOf gitea@<me>/
What am I doing wrong?
Thank you for any help!
Sorry for so much snipping, I’m not at liberty to disclose some of the information.