Authentication
hof mod
supports authenticating to code hosts
for private modules and increased rate limits.
When you run hof mod
, it looks for authentication methods
to use when fetching source code.
We recommend setting up one of these metheods for your primary code hosts,
especially GitHub for better rate limits in CI,
even if you only use public repositories.
The lookup order is:
- .netrc
- ENV variables
- sshkey
.netrc
Used if the .netrc
file exists in the home directory and has a matching machine name.
On Windows, the file is _netrc
.
ENV variables
These environment variables are recognized for three major code hosts.
GITHUB_TOKEN
GITLAB_TOKEN
BITBUCKET_TOKEN
BITBUCKET_USERNAME
andBITBUCKET_PASSWORD
sshkey
The following locations are searched for sshkey configuration
~/.ssh/config
/etc/ssh/config
~/.ssh/id_rsa