Bug 273134 - ports-mgmt/pkg: pkg 1.20.5 ignores NETRC env variable
Summary: ports-mgmt/pkg: pkg 1.20.5 ignores NETRC env variable
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-14 12:14 UTC by Dominik Lisiak
Modified: 2023-08-21 13:28 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (pkg)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominik Lisiak 2023-08-14 12:14:34 UTC
Having repo config like:

default: {
    enabled: yes,
    priority: 0,
    url: "https://example.com/freebsd/pkg/${ABI}/default",
    mirror_type: "none",
    signature_type: "none",
    fingerprints: "/usr/share/keys/pkg",
    env: {
        NETRC: "/usr/local/etc/pkg/.netrc"
    }
}

basic authentication no longer works.
I've tried to see how libcurl treats .netrc files, but it seems the feature must be explicitly enabled:
https://curl.se/libcurl/c/CURLOPT_NETRC.html

The bug is already reported on GitHub:
https://github.com/freebsd/pkg/issues/2170
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2023-08-21 13:28:17 UTC
fixed in git