cannot install GIT
Asked by Chris Habgood:

we do:  
apt-get update \&\& apt-get install -y unzip git  
git --version  
errors saying git command not found


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

What do you get as a result from the "apt-get install git" command?

comments: author: Chris Habgood
body: Reading package lists...  
Building dependency tree...  
Reading state information...  
E: Unable to locate package git


author: Nic Brough -Adaptavist-
body: Ok, that is what I suspected - you are using a Linux distribution that does not include git in its repositories.

You'll need to get it added. A search for "install git on \<my distribution\>" is pretty much guaranteed to find you the answer to doing that.


author: Chris Habgood
body: we are running the pipeline, about 4 months it was working but then it stopped. so something in the bitbucket distro changed about 4+ months ago.


author: Chris Habgood
body: I have tried to install git from the source, but when i try to build it 'make' is not installed. whatever distro this is, i cannot seem to install much


author: Chris Habgood
body: https://linuxize.com/post/how-to-install-git-on-debian-9/#installing-git-with-apt

- apt install make libssl-dev libghc-zlib-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip  
- wget https://github.com/git/git/archive/v2.18.0.tar.gz -O git.tar.gz  
- tar -xf git.tar.gz  
- cd git-\*  
- make prefix=/usr/local all  
- make prefix=/usr/local install  
run the build

<br />

<br />

E: Package 'make' has no installation candidate  
E: Unable to locate package libssl-dev  
E: Unable to locate package libghc-zlib-dev  
E: Unable to locate package libcurl4-gnutls-dev  
E: Unable to locate package libexpat1-dev  
E: Unable to locate package gettext


author: Nic Brough -Adaptavist-
body: That looks like a broken Ubuntu system to me - whilst git is not installed by default on Ubuntu, it's certainly in the repositories. And make is installed by default.

So I'm a bit lost on what is happening in that install.


author: Chris Habgood
body: yes i have been trying to troubleshot this for a week now, building like 100 times. Is there anyone i can contact about this? Like i mentioned, it was working then stopped a few months ago.


author: Nic Brough -Adaptavist-
body: All I can suggest is a support call over at <https://support.atlassian.com/contact>


author: Theodora Boudale
body: Hi Chris,

Pipelines builds that run on our own infrastructure use Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file.

The error you get is most likely related to the Docker image you are using as a build container rather than Pipelines. You can try specifying a different Docker image as a build container in your bitbucket-pipelines.yml file (perhaps one with Git preinstalled).

If you are still facing issues, you can create a support ticket using the link that Nic provided. In "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you provide the URL of the workspace that is on a paid billing plan, to proceed with ticket creation.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud