1APT_AUTH.CONF(5)                      APT                     APT_AUTH.CONF(5)
2
3
4

NAME

6       apt_auth.conf - Login configuration file for APT sources and proxies
7

DESCRIPTION

9       APT configuration files like sources.list(5) or apt.conf(5) need to be
10       accessible for everyone using apt tools on the system to have access to
11       all package-related information like the available packages in a
12       repository. Login information needed to connect to a proxy or to
13       download data from a repository on the other hand shouldn't always be
14       accessible by everyone and can hence not be placed in a file with
15       world-readable file permissions.
16
17       The APT auth.conf file /etc/apt/auth.conf, and .conf files inside
18       /etc/apt/auth.conf.d can be used to store login information in a
19       netrc-like format with restrictive file permissions.
20

NETRC-LIKE FORMAT

22       The format defined here is similar to the format of the ~/.netrc file
23       used by ftp(1) and similar programs interacting with servers. It is a
24       simple token-based format with the following tokens being recognized;
25       Unknown tokens will be ignored. Tokens may be separated by spaces, tabs
26       or newlines.
27
28       machine [protocol://]hostname[:port][/path]
29           Entries are looked up by searching for the machine token matching
30           the hostname of the URI apt needs login information for. Extending
31           the netrc-format a portnumber can be specified. If no port is given
32           the token matches for all ports. Similar the path is optional and
33           only needed and useful if multiple repositories with different
34           login information reside on the same server. A machine token with a
35           path matches if the path in the URI starts with the path given in
36           the token. Once a match is made, the subsequent tokens are
37           processed, stopping when the end of file is reached or another
38           machine token is encountered.
39
40           If protocol is not specified, the entry only matches https and
41           tor+https.
42
43       login name
44           The username to be used.
45
46       password string
47           The password to be used.
48

EXAMPLE

50       Supplying login information for a user named apt with the password
51       debian for the sources.list(5) entry
52
53           deb https://example.org/debian buster main
54
55       could be done in the entry directly:
56
57           deb https://apt:debian@example.org/debian buster main
58
59       Alternatively an entry like the following in the auth.conf file could
60       be used:
61
62           machine example.org
63           login apt
64           password debian
65
66       Or alternatively within a single line:
67
68           machine example.org login apt password debian
69
70       If you need to be more specific all of these lines will also apply to
71       the example entry:
72
73           machine example.org/deb login apt password debian
74           machine example.org/debian login apt password debian
75           machine example.org/debian/ login apt password debian
76
77       On the other hand neither of the following lines apply:
78
79           machine example.org:443 login apt password debian
80           machine example.org/deb/ login apt password debian
81           machine example.org/ubuntu login apt password debian
82           machine example.orga login apt password debian
83           machine example.net login apt password debian
84
85

NOTES

87       Basic support for this feature is present since version 0.7.25, but was
88       undocumented for years. The documentation was added in version 1.5
89       changing also the implementation slightly. For maximum backward
90       compatibility you should avoid multiple machine tokens with the same
91       hostname, but if you need multiple they should all have a path
92       specified in the machine token.
93
94       Login information in auth.conf are more flexible than those in
95       sources.list. For example, login information can be specified for parts
96       of a repository only, or if the sources.list entry redirects elsewhere,
97       login information for the redirect destination can be supplied.
98

FILES

100       /etc/apt/auth.conf
101           Login information for APT sources and proxies in a netrc-like
102           format. Configuration Item: Dir::Etc::netrc.
103
104       /etc/apt/auth.conf.d/*.conf
105           Login information for APT sources and proxies in a netrc-like
106           format. Configuration Item: Dir::Etc::netrcparts.
107

SEE ALSO

109       apt.conf(5) sources.list(5)
110

BUGS

112       APT bug page[1]. If you wish to report a bug in APT, please see
113       /usr/share/doc/debian/bug-reporting.txt or the reportbug(1) command.
114

AUTHOR

116       APT team
117

NOTES

119        1. APT bug page
120           http://bugs.debian.org/src:apt
121
122
123
124APT 2.0.2                      02 December 2019               APT_AUTH.CONF(5)
Impressum