Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion openhands/usage/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,21 @@ These variables correspond to the `[security]` section in `config.toml`:

## Integration Variables

### Git Provider Access
| Environment Variable | Type | Default | Description |
|---------------------|------|---------|-------------|
| `ALLOW_INSECURE_GIT_ACCESS` | boolean | `false` | Allow OpenHands to connect to git providers over plain HTTP. Set this only for trusted local or internal Gitea/Forgejo instances where HTTPS is not available. |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wording is slightly narrower than the actual code behavior.

In provider.py, the insecure-HTTP path triggers for any provider whose host starts with http:// (e.g. a self-hosted GitLab over plain HTTP)

  if domain and domain.strip().startswith('http://'):
      allow_insecure = os.environ.get('ALLOW_INSECURE_GIT_ACCESS', 'false').lower() in ('true', '1', 'yes')

Could we generalize the description slightly, e.g.:

Allow OpenHands to connect to git providers over plain HTTP. Set this only for trusted local or internal git providers (such as Gitea/Forgejo) where HTTPS is not available.


<Warning>
`ALLOW_INSECURE_GIT_ACCESS=true` permits insecure HTTP connections to git providers. Only enable it for trusted local or internal networks that you control. Do not use it for public or untrusted git providers.
</Warning>

When running OpenHands with Docker, set this on the OpenHands server container:

```bash
docker run -e ALLOW_INSECURE_GIT_ACCESS=true openhands/openhands
```

### GitHub Integration
| Environment Variable | Type | Default | Description |
|---------------------|------|---------|-------------|
Expand Down Expand Up @@ -249,4 +264,4 @@ export DEBUG_RUNTIME=true
docker run -e LLM_API_KEY="your-key" -e DEBUG=true openhands/openhands
```

6. **Validation**: Invalid environment variable values will be logged as errors and fall back to defaults.
6. **Validation**: Invalid environment variable values will be logged as errors and fall back to defaults.
Loading