Skip to content

docs: drop --repo gh-cli from dnf install lines - #13444

Merged
babakks merged 1 commit into
cli:trunkfrom
c-tonneslan:docs/dnf-install-drop-repo-flag
May 18, 2026
Merged

babakks merged 1 commit into
cli:trunkfrom
c-tonneslan:docs/dnf-install-drop-repo-flag

Conversation

@c-tonneslan

Copy link
Copy Markdown
Contributor

Closes #12808.

The documented `dnf` install lines pin resolution to the gh-cli repo with `--repo gh-cli`. That repo only ships the `gh` package, so on a fresh Fedora install without `git` already present the install fails with:

```
nothing provides git needed by gh-2.87.3-1.x86_64 from gh-cli
```

Dropped `--repo gh-cli` from the install command in both the DNF5 and DNF4 sections. dnf still pulls `gh` from the gh-cli repo (it's where the package lives) but can now resolve `git` from the system repos. The upgrade lines already use a bare `dnf update gh` so they're unchanged.

Matches what @niik proposed in the issue thread after spotting that other projects (docker, vagrant) use `addrepo` without the restrictive `--repo` flag.

The documented dnf install lines pin resolution to the gh-cli repo
with --repo gh-cli. That repo only ships the gh package, so on a
fresh Fedora install without git already present the install fails
with "nothing provides git needed by cligh-2.87.3-1.x86_64 from gh-cli"
(cli#12808). Dropping --repo lets dnf pull git from the system repos
while still installing gh from gh-cli.

The maintainer suggested this in the issue thread after spotting
that other projects (docker, vagrant) use addrepo without the
restrictive --repo flag.

Closes cli#12808

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
@c-tonneslan
c-tonneslan requested a review from a team as a code owner May 16, 2026 17:57
@c-tonneslan
c-tonneslan requested a review from BagToad May 16, 2026 17:57
@github-actions github-actions Bot added external pull request originating outside of the CLI core team needs-triage needs to be reviewed labels May 16, 2026
@github-actions github-actions Bot removed the needs-triage needs to be reviewed label May 18, 2026

@babakks babakks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for your contribution, @c-tonneslan! 🙏

@babakks
babakks enabled auto-merge May 18, 2026 09:19
@babakks
babakks merged commit 81ed6d4 into cli:trunk May 18, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team ready-for-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instruction for fedora fail

2 participants