Skip to content

Commit b5e5714

Browse files
authored
add GOPRIVATE to private modules instructions
Fixes #13.
1 parent 4dde556 commit b5e5714

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ to set up the secret in the repo's settings. After adding a secret like
159159
It's possible to install modules from private GitHub repositories without using
160160
your own proxy. You'll need to add a
161161
[personal access token](https://github.com/settings/tokens) as a secret
162-
environment variable for this to work.
162+
environment variable, as well as configure
163+
[GOPRIVATE](https://golang.org/pkg/cmd/go/#hdr-Module_configuration_for_non_public_modules).
163164

164165
```yaml
165166
- name: Configure git for private modules
@@ -168,6 +169,13 @@ environment variable for this to work.
168169
run: git config --global url."https://YOUR_GITHUB_USERNAME:${TOKEN}@github.com".insteadOf "https://github.com"
169170
```
170171

172+
```yaml
173+
env:
174+
GOPRIVATE: "*.company.com"
175+
jobs:
176+
[...]
177+
```
178+
171179
#### How do I install Linux packages?
172180

173181
Use `sudo apt`, making sure to only run the step on Linux:

0 commit comments

Comments
 (0)