We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
HTTP_AUTH_TOKEN_
HTTP_AUTH_HEADER_
1 parent 7dd3f17 commit 4b79cacCopy full SHA for 4b79cac
1 file changed
content/manuals/build/building/secrets.md
@@ -264,3 +264,13 @@ $ docker build \
264
--secret id=GIT_AUTH_HEADER.gitlab.com,env=GITLAB_AUTH_HEADER \
265
https://github.com/example/todo-app.git
266
```
267
+
268
+## HTTP authentication for `COPY` and `ADD`
269
270
+To use secrets in `COPY` or `ADD` commands, you can create
271
+`HTTP_AUTH_TOKEN_<host>` or `HTTP_AUTH_HEADER_<host>` secrets for use when
272
+accessing the specified host. For example `HTTP_AUTH_TOKEN_127.0.0.1=token` will
273
+make requests to `127.0.0.1` add a header `Authorization: Bearer token`.
274
275
+These variables follow the same convention as the [Git HTTP authentication
276
+scheme](#http-authentication-scheme) handling.
0 commit comments