diff --git a/docs/cookie-file.md b/docs/cookie-file.md index 2b1d9fb99..3b14bbba1 100644 --- a/docs/cookie-file.md +++ b/docs/cookie-file.md @@ -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: [ { @@ -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",