Bench init fails on Ubuntu 24.04 / Git 2.52 with GnuTLS error

Hi Team,

I’m trying to initialize a new Frappe Bench on Ubuntu 24.04:

$ bench init frappe-bench --frappe-branch version-15

But it fails while cloning Frappe:

$ git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-15 --depth 1 --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 3383, done.
remote: Counting objects: 100% (3383/3383), done.
remote: Compressing objects: 100% (3048/3048), done.
error: RPC failed; curl 56 GnuTLS recv error (-24): Decryption has failed.
error: 14819 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

The traceback from Bench:

bench.exceptions.CommandFailedError: git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --branch version-15 --depth 1 --origin upstream

Environment:

  • Ubuntu 24.04 LTS
  • Git version: 2.52.0
  • Bench version: 5.0.0-dev
  • Python: 3.12
  • Curl version: 8.5.0 (OpenSSL 3.0.13)

This worked previously on my system with older Git.
It seems related to Git 2.52 + GnuTLS failing on HTTPS large repository downloads.

screenshot:

Question:
Has anyone seen this issue, or is there a recommended way to bench init Frappe on Ubuntu 24.04 with this Git version?

try using pipx to install frappe bench instead then try again
usually it prefered to install any python based cli packages using pipx instead of normal pip
because pipx do isolation for that cli package in the system so no possible collision with any package or dependencies in the os

follow these steps and tell me if it works:

sudo apt install pipx
pipx ensurepath

close your terminal application and open it again

exit
wsl -d Ubuntu-24.04

install frappe bench

pipx install frappe-bench

initialize frappe bench

cd ~
bench init --frappe-branch [version-branch] [bench-folder]