Doing the same configuration using the app.netlify.com GUI, it works like a charm. Only the netlify.toml set up never works for me. Can anyone give me advice what I am doing wrong? Thanks.
Hi, @dafoobar. This environment variable is needed before the clone of the repo.
The netlify.toml file is only available after the repo cloning it done. At that point it it too late to set this environment variable. For this reason, it can only be set in the web UI.
If there are other questions about this, please let us know.
Those settings are indeed intended for “variables needed after clone, during build” which is when all other variables are useful and used. Those git related ones are the only ones in that exact situation of not being controllable via the toml file. Thanks for your suggestion - we’ll work with our documentation team on a way to make this more obvious in our docs! Could you point us in the right direction? Where would you have expected to find this mentioned? In the toml file doc you linked, or perhaps here? Build environment variables | Netlify Docs
In Build environment variables | Netlify Docs it should be mentioned that a subset of env vars can be defined in netlify.toml - linking to the toml documentation, where it should be mentioned clearly what is possible and what not.