Check Installation
A CircleCI build can output the following message during the Checkout code step: "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. The first step to take in troubleshooting this issue is to check if you have git and openssh-client installed on your image. This can be done with the following commands:
git --version
ssh -V
Install Git and OpenSSH Client
Git and SSH can either be built into the Docker image or installed during the build.
For example, in a Debian based system they can be installed via:
- run: apt-get update && apt-get install -y openssh-client git
On Alpine based images, they can be installed via:
- run: apk add --update openssh-client git
CircleCI also provides Pre-Built CircleCI Docker Images which come with SSH, Git, and several other tools required by the build agent.
Comments
Article is closed for comments.