mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-13 03:07:29 +00:00
Merge pull request #3477 from raffis/gh-auth-token
fix(install-script): support $GITHUB_TOKEN
This commit is contained in:
commit
c479eb80c6
2 changed files with 5 additions and 2 deletions
|
|
@ -9,6 +9,9 @@ To install the latest release run:
|
|||
curl -s https://raw.githubusercontent.com/fluxcd/flux2/main/install/flux.sh | sudo bash
|
||||
```
|
||||
|
||||
**Note**: You may want to export the `GITHUB_TOKEN` environment variable using a [personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
|
||||
to avoid GitHub API rate-limiting errors if executing the install script repeatedly during a short time frame.
|
||||
|
||||
The install script does the following:
|
||||
* attempts to detect your OS
|
||||
* downloads and unpacks the release tar file in a temporary directory
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@ download() {
|
|||
|
||||
case $DOWNLOADER in
|
||||
curl)
|
||||
curl -o "$1" -sfL "$2"
|
||||
curl -u user:$GITHUB_TOKEN -o "$1" -sfL "$2"
|
||||
;;
|
||||
wget)
|
||||
wget -qO "$1" "$2"
|
||||
wget --auth-no-challenge --user=user --password=$GITHUB_TOKEN -qO "$1" "$2"
|
||||
;;
|
||||
*)
|
||||
fatal "Incorrect executable '${DOWNLOADER}'"
|
||||
|
|
|
|||
Loading…
Reference in a new issue