From 4123c322224b28bcf7887a9fae9c71b74f149e70 Mon Sep 17 00:00:00 2001 From: Gil <3171369+gcstang@users.noreply.github.com> Date: Mon, 1 Oct 2018 13:16:57 -0500 Subject: [PATCH] Add documentation to setup netrc when using proxy with private repositories. (#712) * changed base to use 1.11-alpine and addded GO111MODULE=on to environment * change go build to be one line with modules on * add vcs systems that were in original stretch image * created multistage build with copy from and path environment update * added env GO111MODULE=on * add and run create default, prereq bash installed, moved go binary, created GOROOT path * update to preferred docker entry point and shorter config path * added fossil and info to links for compare of VCS * Add section to Authenticate via .netrc Authenticate private repositories via .netrc on Docker Image * Update to simplify text changed to simplify and add defaults for Athens --- docs/content/design/proxy.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/content/design/proxy.md b/docs/content/design/proxy.md index 79fe7141..6e86d0b6 100644 --- a/docs/content/design/proxy.md +++ b/docs/content/design/proxy.md @@ -70,3 +70,20 @@ Private module filters are string globs that tell the proxy what is a private mo ### Exclude Lists for Public Modules Exclude lists for public modules are also globs that tell the proxy what modules it should never download from the registry. For example, the string `github.com/arschles/**` tells the proxy to always return `404 Not Found` to clients. + +## Authenticate private repositories via .netrc + +1. Create a .netrc file that looks like the following: + + `machine ` + + `login ` + + `password ` + +2. Tell Athens through an environment variable the location of that file + + `NETRC=` + +3. Athens will copy the file into the home directory. Alternatively, if the host of the Athens server already has a .netrc file in the home directory, then authentication should work out of the box. +