← Back to issue list

charmcraft 1.2.1 (candidate): cannot pull python deps with git

View original Github issue

Metadata

Project
charmcraft
Number
#498
Type
issue
State
closed
Author
davigar15
Labels
—
Created
Updated
Closed

Current evaluation

Reported that charmcraft 1.2.1 fails with "Cannot find command 'git'" when pulling Git-based Python deps. Maintainer facundobatista closed it as config: add git to build-packages (see Charm Discourse thread 4986); no code change.

Resolution: closed not a bug

Reason: facundobatista replied on 2021-08-17 that the charm's build environment simply needs 'git' in its build-packages, pointing to a Charm Discourse post explaining charmcraft/parts with Git requirements, and the issue was closed with no repo fix. The error was caused by the missing build dependency in the reporter's charmcraft.yaml, not a regression from 1.2.1.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Hello, I am getting the following error when building a charm with charmcraft 1.2.1 (rev 603): ``` mm 2021-08-17 08:53:03,700 craft_parts.executor.step_handler DEBUG :: :: ERROR: Error [Errno 2] No such file or directory: 'git' while executing command git clone -q https://github.com/charmed-osm/ops-lib-charmed-osm/ /tmp/pip-req-build-me5ajux4 mm 2021-08-17 08:53:03,700 craft_parts.executor.step_handler DEBUG :: :: ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH? ``` Not happening with charmcraft 1.1.1

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Reported that charmcraft 1.2.1 fails with "Cannot find command 'git'" when pulling Git-based Python deps. Maintainer facundobatista closed it as config: add git to build-packages (see Charm Discourse thread 4986); no code change.
stealth/space-bunny-alpha — closed not a bug Closed as a build configuration issue: git must be included in build-packages for builds using Git-based Python dependencies.
qwen3.6-35b-a3b-mtp-q6 — — Closed as user error. Maintainer clarified that git must be explicitly added to the build packages list, as it is no longer included by default. Referenced a forum post for configuration details.
qwen/qwen3.6-35b-a3b — — Closed as resolved. The build fails because git is absent from the container. Resolution requires adding git to the charmcraft build-packages configuration to fetch dependencies via git.
qwen/qwen3.6-35b-a3b — — Resolved as configuration requirement. Maintainer clarified that git must be explicitly added to the build packages in charmcraft, as it is no longer included by default. A linked forum post provided setup instructions.
qwen3.6-35b-a3b-mtp-q6 — — Closed as user error. Git must be explicitly added to the build packages in the charmcraft configuration, as detailed in the linked forum guide.

Update history

No update history recorded yet.

Related work

  • Duplicate Of: canonical/charmcraft#490 (confidence 88%)

    Charmcraft issue with the same 'Cannot find command git' error, also resolved by adding git to parts.charm.build-packages.

Related issues

Issue Project State Summary Similarity
#490 pack fails with ERROR: Cannot find command 'git' charmcraft closed Resolved as a missing build dependency: add git under parts.charm.build-packages in charmcraft.yaml; the maintainer provided this configuration before closing the issue.
76%
#605 Charmcraft fails to build due to lack of Git charmcraft closed Resolved as a build-environment configuration issue: the reporter fixed the failure by adding git to parts.charm.build-packages in charmcraft.yaml.
75%
#555 Charmcraft doesn't allow to pull non-published operator framework charmcraft closed Closed as a duplicate of canonical/charmcraft#498; Git-based Python requirements work when git is declared in the charm part's build-packages.
74%
#502 charmcraft internal error! BaseConfigurationError: Failed to install apt-utils charmcraft closed Resolved through project configuration: the author added git to parts.charm.build-packages in charmcraft.yaml; no Charmcraft code fix was reported.
72%
#55 `charmcraft build` breaks when pip packages come from github charmcraft closed GitHub requirements now work in snap-packaged Charmcraft 0.2, which added preliminary git support; the reporter confirmed the fix. Released via PR #58.
71%