3

How to downgrade Git from version 2.38.1 to 2.37.3 on Ubuntu 20.04?

This is needed because Atlassian Bitbucket Server 8.+ do not support latest version of Git. Please se at: https://confluence.atlassian.com/bitbucketserver/supported-platforms-776640981.html

I installed latest git wit adding this repo to source.list: ppa:git-core/ppa

Command apt policy git makes:

git:
Installed: 1:2.38.1-0ppa1~ubuntu20.04.1
Candidate: 1:2.38.1-0ppa1~ubuntu20.04.1
Version table:
*** 1:2.38.1-0ppa1~ubuntu20.04.1 500
    500 http://ppa.launchpad.net/git-core/ppa/ubuntu focal/main amd64 Packages
    100 /var/lib/dpkg/status
 1:2.25.1-1ubuntu3.6 500
    500 http://mirror.leaseweb.com/ubuntu focal-updates/main amd64 Packages
    500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
 1:2.25.1-1ubuntu3 500
    500 http://mirror.leaseweb.com/ubuntu focal/main amd64 Packages

After running a sudo apt install -f ./git-all_2.37.3-0ppa1~ubuntu20.04.1_all.deb I get error below:

The following packages have unmet dependencies:
git-all : Depends: git (< 1:2.37.3-.)
E: Unable to correct problems, you have held broken packages.

Thanks, Matti

7
  • Please explain why. Nov 26, 2022 at 9:52
  • Because Atlassian Bitbucket 8.+ do not support latest version of Git. I try now to downgrade git but geting this error: git-compat-util.h:1504:10: fatal error: zlib.h: No such file or directory. I am also installed this successfully: systutorials.com/how-to-install-the-zlib-library-in-ubuntu Nov 26, 2022 at 9:53
  • How did you install Git 2.38 - did you use the ppa:git-core/ppa? Please include in your question. Nov 26, 2022 at 11:23
  • It is now added to my question and yes I used: ppa:git-core/ppa Nov 26, 2022 at 11:59
  • Yes, I see the issue now. The PPA continously upgrades GIT, and now Atlassian haven't "kept up". However, the old packages should still be there. Nov 26, 2022 at 12:16

1 Answer 1

2

There is no other way than self compile it from C/C++ Source Code:

https://petri.com/install-git-ubuntu/

https://www.digitalocean.com/community/tutorials/how-to-install-git-from-source-on-ubuntu-20-04-quickstart

And now it works perfect: https://bitbucket.i4ware.fi/repos?visibility=public

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .