Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5995

How to install Git on Heroku?

$
0
0

I need my web app in Heroku to have git installed (I'm on the heroku-24 stack). I'm trying to use heroku-community/apt. I created Aptfile with the following content (found it here):

https://launchpad.net/~git-core/+archive/ubuntu/ppa/+files/git-all_2.46.0-0ppa1~ubuntu20.04.1_all.deb

Then, I added the buildpack:

$ heroku buildpacks:add --index 1 heroku-community/apt=== zerocracy Buildpack URLs1. heroku-community/apt2. heroku/ruby

During the deployment, I see this log:

remote: -----> Building on the Heroku-24 stackremote: -----> Using buildpacks:remote:        1. heroku-community/aptremote:        2. heroku/rubyremote: -----> Apt app detectedremote: -----> Detected Aptfile or Stack changes, flushing cacheremote: -----> Updating APT package indexremote:        Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]remote:        Get:2 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]remote:        Get:3 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]remote:        Get:4 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages [1,808 kB]remote:        Get:5 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]remote:        Get:6 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages [19.3 MB]remote:        Get:7 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [594 kB]remote:        Get:8 http://archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [449 kB]remote:        Get:9 http://archive.ubuntu.com/ubuntu noble-backports/universe amd64 Packages [11.5 kB]remote:        Get:10 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [337 kB]remote:        Get:11 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [404 kB]remote:        Get:12 https://apt.postgresql.org/pub/repos/apt noble-pgdg InRelease [129 kB]remote:        Get:13 https://apt.postgresql.org/pub/repos/apt noble-pgdg/main amd64 Packages [476 kB]remote:        rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission deniedremote:        Fetched 24.2 MB in 2s (13.3 MB/s)remote:        Reading package lists...remote: -----> Fetching https://launchpad.net/~git-core/+archive/ubuntu/ppa/+files/git-all_2.46.0-0ppa1~ubuntu20.04.1_all.debremote: -----> Installing git-all_2.46.0-0ppa1~ubuntu20.04.1_all.debremote: -----> Writing profile scriptremote: -----> Rewrite package-config filesremote: -----> Ruby app detected...

However, git is not available:

+ git --versionsh: 1: git: not found

Viewing all articles
Browse latest Browse all 5995

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>