Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Improve 'use git over HTTPS' guide
Browse files Browse the repository at this point in the history
By adding links to various documentation pages from git vendors about
creating a personal access token.
  • Loading branch information
hiddeco committed Sep 24, 2019
1 parent 2f51f35 commit 7c68c1b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/guides/use-git-https.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,15 @@ workload.
> of the SSH keyring.
> **Note:** the variables _must be escaped with `$()`_ for Flux
> to be able to make use of them, e.g. `$(GIT_AUTHKEY)`.
> to be able to make use of them, i.e. `$(GIT_AUTHKEY)`.
1. Create a personal access token to be used as the `GIT_AUTHKEY`:

1. create a Kubernetes secret with both variables and their values (replace `<username>` and `<token/password>`):
- [GitHub](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line)
- [GitLab](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token)
- [BitBucket](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html)

1. Create a Kubernetes secret with both variables and their values (replace `<username>` and `<token/password>`):

```sh
kubectl create secret generic flux-git-auth --from-literal=GIT_AUTHUSER=<username> --from-literal=GIT_AUTHKEY=<token/password>
Expand All @@ -33,7 +39,7 @@ workload.
...
```
1. mount the Kubernetes secret as environment variables using `envFrom`
1. Mount the Kubernetes secret as environment variables using `envFrom`
and use them in your `--git-url` argument:

```yaml
Expand Down

0 comments on commit 7c68c1b

Please sign in to comment.