Create and configure a .netrc file
A .netrc
file is a configuration file used by many command-line tools and programs, including curl, FTP, and Git. The primary purpose of the file is to store login credentials.
Complete the following steps to create and configure a .netrc
file:
1. Create a file named .netrc
by running the following commands:
touch ~/.netrc chmod 600 ~/.netrc
2. Edit the file to add your credentials, where license-id
is a string literal and <PE_LICENSE_ID> is your PE License ID:
machine artifacts-puppetcore.puppet.com login license-id password <PE_LICENSE_ID>
3. Run a command with the --netrc
option so that the credentials stored in the .netrc
file are used for authentication, as shown in the following example:
curl --netrc 'https://artifacts-puppetcore.puppet.com/v1/download?version=8.11.0&type=perepo&os_name=el&os_version=9&os_arch=x86_64' -J -O