You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WARNING: Do not include credentials in the index url. If needed, provide authentication through a `.netrc` file (as described below).
224
+
225
+
To provide `.netrc` authentication for the index server:
226
+
227
+
. Create a key/value secret (see xref:/how-tos/configuring/creating-secrets.adoc[creating secrets for your builds]).
228
+
Set `.netrc` as the key. Upload the content of your `.netrc` file as the value. For more details on netrc files,
229
+
review the link:https://pip.pypa.io/en/stable/topics/authentication/#netrc-support[pip documentation for netrc support].
230
+
231
+
. In your `.tekton/` PipelineRun files, add the newly created secret to the `.spec.workspaces` section:
232
+
233
+
+
234
+
[source,yaml]
235
+
----
236
+
spec:
237
+
# ...
238
+
workspaces:
239
+
# ...
240
+
- name: netrc
241
+
secret:
242
+
secretName: my-netrc # the name you assigned to the secret in step 1
243
+
----
244
+
245
+
. In the `.spec.pipelineSpec.tasks` section, find the entry with `name: prefetch-dependencies`.
246
+
Add the `netrc` workspace to the list of workspaces (if not present):
247
+
248
+
+
249
+
[source,yaml]
250
+
----
251
+
tasks:
252
+
# ...
253
+
- name: prefetch-dependencies
254
+
# ...
255
+
workspaces:
256
+
# ...
257
+
- name: netrc
258
+
workspace: netrc
259
+
----
260
+
207
261
== Enabling prefetch builds for `npm`
208
262
Cachi2 supports `npm` by fetching any dependencies you declare in your `package.json` and `package-lock.json` project files. The npm CLI manages the `package-lock.json` file automatically, and Cachi2 fetches any dependencies and enables your build to install them without network access.
0 commit comments