> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/autofix-and-remediation/connect-private-packages/cargo-private-packages.md).

# Cargo - Private Packages

For Aikido to update dependencies that include private packages, it needs access to your private registries so it can generate accurate lockfile updates. Follow the steps below to configure private Cargo packages.

1. Navigate to the [autofix settings](https://app.aikido.dev/issues/fix/settings) page and click on "*Connect Registry*"
2. Select *Cargo*

<figure><img src="/files/OxKeOOLDhyBMUWlbW8Ig" alt=""><figcaption></figcaption></figure>

3. Cargo uses the `CARGO_REGISTRIES_<INDEX_NAME>_TOKEN` environment variables for token-based authentication to a registry named `<INDEX_NAME>`.

For example for the following `config.toml` file:

```
[registries.example]
index = "https://example.com/git/index"
```

You can use `CARGO_REGISTRIES_EXAMPLE_TOKEN` to set the token for the example registry.

4. Click on "*Save*"


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/autofix-and-remediation/connect-private-packages/cargo-private-packages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
