Conversation
* add authentication support for private repositories support for ~/.netrc support for environment variable support for stdin * document authentication methods
Introduce an authentication system to fetch scripts from private sources
like GitHub and GitLab.
- Add `--auth-header` flag and `VET_AUTH_HEADER` env var to allow custom
authentication headers (e.g., "PRIVATE-TOKEN: {}").
- Support providing tokens via `--token-stdin` (piping) and the
`VET_TOKEN` environment variable, defaulting to "Authorization: Bearer {}".
- Add support for `-n, --netrc`.
ehthxC7x9D
reviewed
Sep 12, 2025
| ``` | ||
| --- | ||
| #### `.netrc` File | ||
| As a fallback, `vet` can read credentials from a `~/.netrc` file if the `-n`, `--netrc` flag is used. This method will be ignored if `VET_AUTH_TOKEN` is set or `--token-stdin` is used. |
There was a problem hiding this comment.
In my research, wget will read a .netrc file by default if it exists. Curl required the -n flag to be set. It may be .netrc would take priority over other auth methods if wget were managing the connection.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce an authentication system to fetch scripts from private sources
like GitHub and GitLab.
--auth-headerflag andVET_AUTH_HEADERenv var to allow customauthentication headers (e.g., "PRIVATE-TOKEN: {}").
--token-stdin(piping) and theVET_TOKENenvironment variable, defaulting to "Authorization: Bearer {}".-n, --netrc.Closes #4