Good day!
We really need your help! I want to configure CircleCI for a private repository that has “submodule”. Submodules are connected via ssh.
The problem is similar to the topic:
Submodule ‘Module’ (git @github.com:/Module.git) registered for path ‘Module’
Cloning into ‘/home/conan/project/Module’…
fatal: cannot run ssh: No such file or directory
fatal: unable to fork
fatal: clone of 'git@github.com:/Module.git’ into submodule path ‘/home/conan/project/Module’ failed
Failed to clone ‘Module’. Retry scheduled
Did on official instructions:
- Create a machine user - Complied with all the prescribed points;
- Moving on to Creating a GitHub User Key:
2.1. For the user of the machine on the local machine, I generate ssh keys (public and private) by means of GitHub instructions;
2.2. Then I insert the public key into the main repository (in the settings → “Deploy key”);
2.3. And insert the private key in the project settings (in CircleCI) in the item “SSH Permissions”. Hostname set as github dot com
But it didn’t. I attach an example of the beginning of the script:
version: 2.0
jobs:
linux-build:
docker:
- image: conanio/gcc6steps: - run: name: Install Git command: | sudo apt-get update sudo apt-get install -qy git - checkout - add_ssh_keys: # machine user fingerprints: "Fingerprint from SSH Permissions" - run: name: Install Submodules command: git submodule sync && git submodule update --init
Please tell me what I’m wrong.
Observations:
- “User key GitHub” has never been used - taken from the “Deploy key” repository tab.
- Also, when the next session in the paragraph “Checkout code” always shows the following:
Either git or ssh (required by git to clone through SSH) is not installed in the image. Falling back to CircleCI’s native git client but the behavior may be different from official git. If this is an issue, please use an image that has official git and ssh installed.
Enumerating objects: 153, done.
Counting objects: 100% (153/153), done.
Compressing objects: 100% (86/86), done.
Total 153 (delta 72), reused 121 (delta 40), pack-reused 0
- In the script replaced: sudo apt-get install -qy git → sudo apt-get install -qy git ca-certificates openssl