Error : Git command not found

#!/bin/bash -eo pipefail
mkdir -p /root/uc2-test && cd /tmp/_circleci_local_build_repo && git ls-files | tar -T - -c | tar -x -C /root/uc2-test && cp -a /tmp/_circleci_local_build_repo/.git /root/uc2-test
/bin/bash: git: command not found
Error: Exited with code 127
Step failed
Error: runner failed (exited with 101)
Task failed
Error: task failed

Hello @adil26,

It looks like you are using a custom Docker image. Is it possible this Docker image does not have git installed?

Incidentally, when presenting a problem for the community to look into, please use text formats where possible, unless only an image will do. Console output is inherently text-based, and it is better thus to avoid images here. If someone wishes to copy+paste some of your output (to run it or to search for it), then cannot do so.

Please edit your original post if you can. Thanks!

1 Like

Hello @KyleTryon,
Thanks for your reply.
Git is already installed in Docker image and it also connected with bitbucket

Could you SSH into the container and attempt to manually use the git command? If possible, could you share the dockerfile here?

I have attached my docker file. kindly check it.

Docker file:
FROM php:7.1.8-apache

COPY ./ /srv/app
COPY .docker/vhost.conf /etc/apache2/sites-available/000-default.conf

#install git
RUN apt-get update \
    && apt-get install -y git
RUN chown -R root:root /srv/app \
    && a2enmod rewrite