Bug 2176531

Summary: dnf copr enable doesn't work behind firewall
Product: [Fedora] Fedora Reporter: Miroslav Suchý <msuchy>
Component: dnf-plugins-coreAssignee: Copr Team <copr-team>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: daniel.mach, jmracek, mblaha, packaging-team-maint, pkratoch, praiskup, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miroslav Suchý 2023-03-08 15:08:12 UTC
This bug was initially created as a copy of Bug #2159208

I am copying this bug because: 



Description of problem:
I am located behind firewall and have to use HTTP/HTTPS proxy for any outgoing internet connections. Hence I configured proxy setting in /etc/dnf/dnf.conf (proxy=http://<redacted_hostname>:912/). This works for regular installation and updates.
It does not work for:
# dnf copr enable tomkep/epel-extras
command.
The command displays the usual disclaimer and waits for confirmation to continue which is given. The command then hangs for the couple of minutes and timeouts with the following error:
Error: Failed to connect to https://copr.fedorainfracloud.org/coprs/tomkep/epel-extras/repo/epel-9/dnf.repo?arch=x86_64: Network is unreachable

Judging from netstat the command is attempting DIRECT connection to the Internet:
tcp        0      1 172.28.38.82:55956      3.225.109.36:443        SYN_SENT    15594/python3       
which for the above-mentioned reason obviously fails.

Version-Release number of selected component (if applicable):
dnf-data-4.12.0-4.el9.alma.noarch
dnf-4.12.0-4.el9.alma.noarch
dnf-plugins-core-4.1.0-3.el9.noarch

How reproducible:
Always

Actual results:
The command timeouts and fails to setup copr repository.

Expected results:
The command works.

Additional info:
The repository works correctly once the configuration file is put in place by hand.
Found on AlmaLinux 9.1.

Comment 1 Fedora Release Engineering 2023-08-16 07:11:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.