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 26, 2019
1 parent 97540fb commit e8c73bc
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions docs/guides/use-git-https.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ as a plain value in your workload.
> to pass the values to the Flux container, e.g. `$(GIT_AUTHKEY)`.
> [Read more about this Kubernetes feature](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/#using-environment-variables-inside-of-your-config).
1. create a Kubernetes secret with two environment variables and their
1. Create a personal access token to be used as the `GIT_AUTHKEY`:

- [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 two environment variables and their
respective values (replace `<username>` and `<token/password>`):

```sh
Expand All @@ -33,7 +39,7 @@ as a plain value in your 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 All @@ -49,6 +55,7 @@ as a plain value in your workload.
- secretRef:
name: flux-git-auth
args:
- --git-url=https://$(GIT_AUTHUSER):$(GIT_AUTHKEY)@<USER>/flux-get-started.git
# Replace `github.com/...` with your git repository
- --git-url=https://$(GIT_AUTHUSER):$(GIT_AUTHKEY)@github.com/fluxcd/flux-get-started.git
...
```
```

0 comments on commit e8c73bc

Please sign in to comment.