Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Clean up doc on GIT_COOKIE_FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
thockin committed Jul 2, 2018
1 parent 94c7154 commit 9ceb61f
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions docs/cookie-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ Git-sync supports use of an HTTP Cookie File for accessing git content.

First, create a secret file from the git cookie file you wish to
use.

Example: if the cookie-file is `~/.gitcookies`:

```
kubectl create secret generic git-cookie-file --from-file=cookie_file=~/.gitcookies
```

Note that the key is `cookie_file`. This is the filename that git-sync will look
for.

# Step 2: Configure Pod/Deployment Volume

In your Pod or Deployment configuration, specify a Volume for mounting the
cookie-file Secret. Make sure to use the same name you used to create the
secret (`git-cookie-file` in the example above).
cookie-file Secret. Make sure to set `secretName` to the same name you used to
create the secret (`git-cookie-file` in the example above).

```
volumes: [
{
Expand All @@ -29,10 +36,12 @@ volumes: [

# Step 2: Configure git-sync container

In your git-sync container configuration, mount your cookiefile at
"/etc/git-secret". Ensure that the environment variable GIT_COOKIE_FILE
is set to true, and that GIT_SYNC_REPO is set to use a URL with the HTTP
In your git-sync container configuration, mount your volume at
"/etc/git-secret". Make sure to pass the `--cookie-file` flag or set the
environment variable `GIT_COOKIE_FILE` to "true", and to use a git repo
(`--repo` flag or `GIT_SYNC_REPO` env) is set to use a URL with the HTTP
protocol.

```
{
name: "git-sync",
Expand Down

0 comments on commit 9ceb61f

Please sign in to comment.