> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Secure Access to GitHub and GitLab

> Understand how Agent reaches GitHub and GitLab through Replit's Git provider proxy, keeping repository credentials outside the sandbox that runs your code.

When Agent runs `git`, `gh`, or `glab`, Replit routes the request through a secure proxy: `github.replit.internal` for GitHub and `gitlab.replit.internal` for GitLab. The proxy adds your connection's credentials outside the sandbox, so Agent never receives a token it could leak.

Only Agent uses the proxy. Your own shell and the Git pane connect to GitHub and GitLab directly with your own account, and your remotes keep their usual URLs.

## What Agent can access

Agent can access exactly what your GitHub or GitLab connection allows. To change that, update the connection in Replit or its permissions on your provider. For background builds, see [Install the Git Provider App](https://docs.replit.com/build/code/install-git-app.md).

## Messages you may see

Agent's Git output names the proxy instead of your provider:

```text theme={null}
github.replit.internal ✅ is Replit's secure GitHub proxy
```

If a request fails, the error says what to do, such as reconnecting GitHub in Replit or giving the connection access to the repository. Errors from GitHub or GitLab themselves, such as a rejected push to a protected branch, appear unchanged.

> [!WARNING]
>
> Don't give Agent a personal access token to work around an error. Fix the connection in Replit instead.
