> 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/~/revisions/27oApOKWT7NW06uHiiU1/aikido-autofix/connect-private-packages/bundle-private-gems.md).

# Bundle - Private gems

When letting Aikido update your dependencies in repositories with private gems, Aikido would need to also have access to the private gems so we can properly update your gem files. You can now provide private gem registry configuration in Aikido for this.

## Configuration in Aikido - Private RubyGems Registry <a href="#configuration-in-aikido---private-rubygems-registry" id="configuration-in-aikido---private-rubygems-registry"></a>

You can configure Aikido to authenticate with your private RubyGems registry when updating the dependencies by following the steps below:

1. Go to your account's settings page for the autofixer in Aikido, [here](https://app.aikido.dev/settings/integrations/autofix).
2. Click on "Manage private registry connection", the configuration modal will now be shown

   <img src="/files/RnRcK3V6xzc1p5Mv24HS" alt="Configure environment variables to connect Aikido with a private package registry." width="563">
3. When you select 'Custom' you will now be able to enter the environment variables we need to complete the automated fixes in your repositories.

   In the example above, we show a possible setup for a private GitHub RubyGems registry. The environment variable key is `BUNDLE_RUBYGEMS__PKG__GITHUB__COM`, and the value is a GitHub access token with the `read:packages` scope. This will vary depending on the private registry you use.
4. Click "Apply Changes" to save the configuration.

## Configuration in Aikido - Private Git Repository <a href="#configuration-in-aikido---private-rubygems-repository" id="configuration-in-aikido---private-rubygems-repository"></a>

### Same SCM organization <a href="#same-scm-organization" id="same-scm-organization"></a>

If the private git repository for the gem is in the same organization as the code being autofixed, you can extend the permissions of the existing access token to include access to the private repository [here](https://app.aikido.dev/issues/fix/settings).

### Different SCM organization <a href="#different-scm-organization" id="different-scm-organization"></a>

You can configure Aikido to authenticate with your private RubyGems git repositories when updating the dependencies by following the steps below:

1. Go to your account's settings page for the autofixer in Aikido, [here](https://app.aikido.dev/settings/integrations/autofix).

2. Click on "Manage private registry connection", the configuration modal will now be shown

   <img src="/files/EnDMJu1VD0KU7VkHEYSo" alt="Configure environment variables to connect Aikido to a private package registry." width="563">

3. When you select 'Custom' you will now be able to enter the environment variables we need to complete the automated fixes in your repositories.

   In the example above, we show a possible setup for a private GitHub Git repository. The environment variable key is `BUNDLE_GITHUB__COM`, and the value is a GitHub access token with repository access.

   | Provider     | Environment Variable Key | Value Format                       |
   | ------------ | ------------------------ | ---------------------------------- |
   | GitHub       | `BUNDLE_GITHUB__COM`     | `x-access-token:your-access-token` |
   | GitLab       | `BUNDLE_GITLAB__COM`     | `oauth2:your-access-token`         |
   | Bitbucket    | `BUNDLE_BITBUCKET__ORG`  | `x-token-auth:your-access-token`   |
   | Azure DevOps | `BUNDLE_DEV__AZURE__COM` | `:your-access-token`               |

4. Click "Apply Changes" to save the configuration.


---

# 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/~/revisions/27oApOKWT7NW06uHiiU1/aikido-autofix/connect-private-packages/bundle-private-gems.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.
