* fix(util/git): use a non-empty password for token-only git credentials Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io> Co-Authored-By: Claude Sonnet 5.5 <michael.kriese+claude-code@mend.io> * fix(util/git): pick token credentials from the host platform for manager host rules Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io> Co-Authored-By: Claude Sonnet 5.5 <michael.kriese+claude-code@mend.io> --------- Co-authored-by: Claude Sonnet 5.5 <michael.kriese+claude-code@mend.io>
Extracts dependencies from Cargo.toml files, and also updates Cargo.lock files too if found.
When using the default rangeStrategy=auto:
- If a "less than" instruction is found (e.g.
<2) thenrangeStrategy=widenwill be selected, - Otherwise,
rangeStrategy=update-lockfilewill be selected.
The update-lockfile default means that most upgrades will update Cargo.lock files without the need to change the value in Cargo.toml.
Private Modules Authentication
Before running the cargo commands to update the cargo.lock, Renovate exports git insteadOf directives in environment variables.
Renovate uses this logic before it updates any "artifacts":
The token from the hostRules entry matching hostType=github and matchHost=api.github.com is added as the default authentication for github.com.
For those running against github.com, this token will be the default platform token.
Next, all hostRules with both a token or username/password and matchHost will be fetched, except for any github.com one from above.
Rules from this list are converted to environment variable directives if they match any of these characteristics:
- No
hostTypeis defined, or hostTypeiscargoorcrate, orhostTypeis a platform (github,gitlab,azure, etc.)
Git index registries
When Renovate clones a git index registry over http(s) to look up versions, it exports the same insteadOf directives as for artifact updates, with hostType=crate in place of hostType=cargo.
Because artifact updates accept hostType=crate rules too, a single crate rule covers both the lookup and the Cargo.lock update.
Git uses the credentials of the directive whose URL matches the index URL.
Cloning a git index registry other than the crates.io index (https://index.crates.io/) requires allowCustomCrateGitRegistries.
Sparse registries (sparse+https://) are fetched over HTTP, and use hostRules like other datasources.