Repository navigation
build: clarify remote Bake Git credential scoping - #26443
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| - [`BUILDX_BAKE_GIT_AUTH_HEADER`](../building/variables.md#buildx_bake_git_auth_header) | ||
| - [`BUILDX_BAKE_GIT_SSH`](../building/variables.md#buildx_bake_git_ssh) | ||
|
|
||
| For HTTP authentication, Bake derives the host from the remote definition URL |
There was a problem hiding this comment.
Could we keep the detailed explanation in the token reference and shorten this paragraph to:
For HTTP authentication, Bake also uses these credentials for Git build contexts on the same host as the remote definition. Private Git contexts on other hosts need separate credentials. See
BUILDX_BAKE_GIT_AUTH_TOKENfor details.
Generated by Codex
| but facilitates the pre-flight authentication in Bake when loading the remote Bake file. | ||
| Supported values are `bearer` (default) and `basic`. | ||
|
|
||
| For builds using a remote Bake definition, Bake also forwards this scheme to |
There was a problem hiding this comment.
Could we shorten this paragraph to avoid repeating the host-selection and variable-naming explanation from the token entry?
Bake also uses this scheme when authenticating Git build contexts on the same host as the remote definition. See
BUILDX_BAKE_GIT_AUTH_TOKENfor details.
Generated by Codex
| $ export BUILDX_BAKE_GIT_AUTH_TOKEN=$(cat git-token.txt) | ||
| ``` | ||
|
|
||
| When you build from a remote Bake definition, Bake also makes the token |
There was a problem hiding this comment.
Could we replace the added paragraphs with the following? This explains the behavior directly, avoids “unsuffixed” and the BuildKit implementation details, and names both variables instead of using “these variables.”
When you build from a remote Bake definition, Bake also uses this token to authenticate Git build contexts on the same host. For example, a definition fetched from
https://git.example.com/team/app.gitcan use the token for a Git context ongit.example.com. Private Git contexts on other hosts need separate credentials.Bake determines which host can use these credentials from the remote definition URL.
When you use only local Bake definition files, these two variables don’t provide credentials for Git build contexts. Configure Git authentication secrets for those contexts instead.
Generated by Codex
The guide only describes Git credentials for fetching Bake definitions. Explain reuse for same-host Git contexts, automatic host selection, and the limits when using local definitions or contexts on other hosts. Keep the detailed explanation in the token reference. Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
a87d3f2 to
8a5470f
Compare
|
@dvdksn Made some changes, let me know if that looks good |
Description
Clarifies that Bake reuses HTTP Git credentials from a remote definition for Git build contexts on the same host. Explains that Bake derives the host automatically from the definition URL, so the environment variable names don't take hostname suffixes.
Documents the limits of this credential reuse: contexts on other hosts need separate credentials, and local-only Bake definitions don't receive credentials through these variables.
Related issues or tickets