Skip to content

Commit

Permalink
Add most popular links to home page
Browse files Browse the repository at this point in the history
  • Loading branch information
mamoodi committed Feb 13, 2025
1 parent d46d99a commit cc0c910
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 39 deletions.
75 changes: 40 additions & 35 deletions docs/modules/usage/how-to/gui-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,72 +26,77 @@ OpenHands automatically exports a `GITHUB_TOKEN` to the shell environment if it
- **Locally (OSS)**: The user directly inputs their GitHub token.
- **Online (SaaS)**: The token is obtained through GitHub OAuth authentication.

#### Setting Up a Local GitHub Token

1. **Generate a Personal Access Token (PAT)**:
<details>
<summary>Setting Up a Local GitHub Token</summary>
1. **Generate a Personal Access Token (PAT)**:
- Go to GitHub Settings > Developer Settings > Personal Access Tokens > Tokens (classic).
- Click "Generate new token (classic)".
- Required scopes:
- `repo` (Full control of private repositories)
- `workflow` (Update GitHub Action workflows)
- `read:org` (Read organization data)

2. **Enter Token in OpenHands**:
2. **Enter Token in OpenHands**:
- Click the Settings button (gear icon) in the top right.
- Navigate to the "GitHub" section.
- Paste your token in the "GitHub Token" field.
- Click "Save" to apply the changes.
</details>

#### Organizational Token Policies
<details>
<summary>Organizational Token Policies</summary>

If you're working with organizational repositories, additional setup may be required:
If you're working with organizational repositories, additional setup may be required:

1. **Check Organization Requirements**:
1. **Check Organization Requirements**:
- Organization admins may enforce specific token policies.
- Some organizations require tokens to be created with SSO enabled.
- Review your organization's [token policy settings](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization).

2. **Verify Organization Access**:
2. **Verify Organization Access**:
- Go to your token settings on GitHub.
- Look for the organization under "Organization access".
- If required, click "Enable SSO" next to your organization.
- Complete the SSO authorization process.
</details>

#### OAuth Authentication (Online Mode)
<details>
<summary>OAuth Authentication (Online Mode)</summary>

When using OpenHands in online mode, the GitHub OAuth flow:
When using OpenHands in online mode, the GitHub OAuth flow:

1. Requests the following permissions:
1. Requests the following permissions:
- Repository access (read/write)
- Workflow management
- Organization read access

2. Authentication steps:
2. Authentication steps:
- Click "Sign in with GitHub" when prompted.
- Review the requested permissions.
- Authorize OpenHands to access your GitHub account.
- If using an organization, authorize organization access if prompted.

#### Troubleshooting

Common issues and solutions:

- **Token Not Recognized**:
- Ensure the token is properly saved in settings.
- Check that the token hasn't expired.
- Verify the token has the required scopes.
- Try regenerating the token.

- **Organization Access Denied**:
- Check if SSO is required but not enabled.
- Verify organization membership.
- Contact organization admin if token policies are blocking access.

- **Verifying Token Works**:
- The app will show a green checkmark if the token is valid.
- Try accessing a repository to confirm permissions.
- Check the browser console for any error messages.
- Use the "Test Connection" button in settings if available.
</details>

<details>
<summary>Troubleshooting</summary>

Common issues and solutions:

- **Token Not Recognized**:
- Ensure the token is properly saved in settings.
- Check that the token hasn't expired.
- Verify the token has the required scopes.
- Try regenerating the token.

- **Organization Access Denied**:
- Check if SSO is required but not enabled.
- Verify organization membership.
- Contact organization admin if token policies are blocking access.

- **Verifying Token Works**:
- The app will show a green checkmark if the token is valid.
- Try accessing a repository to confirm permissions.
- Check the browser console for any error messages.
- Use the "Test Connection" button in settings if available.
</details>

### Advanced Settings

Expand Down
14 changes: 10 additions & 4 deletions docs/modules/usage/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,18 @@ The `Advanced Options` also allow you to specify a `Base URL` if required.
<img src="/img/settings-advanced.png" alt="settings-modal" width="335" />
</div>


<div style={{ marginTop: '20px' }}>
Now you're ready to <a href="./getting-started">get started with OpenHands</a>.
</div>

## Versions

The command above pulls the most recent stable release of OpenHands. You have other options as well:
- For a specific release, use `docker.all-hands.dev/all-hands-ai/openhands:$VERSION`, replacing $VERSION with the version number.
- We use semver, and release major, minor, and patch tags. So `0.9` will automatically point to the latest `0.9.x` release, and `0` will point to the latest `0.x.x` release.
- For the most up-to-date development version, you can use `docker.all-hands.dev/all-hands-ai/openhands:main`. This version is unstable and is recommended for testing or development purposes only.
The [docker command above](./installation#start-the-app) pulls the most recent stable release of OpenHands. You have other options as well:
- For a specific release, replace $VERSION in `openhands:$VERSION` and `runtime:$VERSION`, with the version number.
We use SemVer so `0.9` will automatically point to the latest `0.9.x` release, and `0` will point to the latest `0.x.x` release.
- For the most up-to-date development version, replace $VERSION in `openhands:$VERSION` and `runtime:$VERSION`, with `main`.
This version is unstable and is recommended for testing or development purposes only.

You can choose the tag that best suits your needs based on stability requirements and desired features.

Expand Down
12 changes: 12 additions & 0 deletions docs/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import { HomepageHeader } from '../components/HomepageHeader/HomepageHeader';
import { translate } from '@docusaurus/Translate';
import Link from '@docusaurus/Link';

export function Header({ title, summary }): JSX.Element {
return (
Expand All @@ -23,6 +24,17 @@ export default function Home(): JSX.Element {
})}
>
<HomepageHeader />
<div style={{ textAlign: 'center', padding: '2rem' }}>
<br />
<h2>Most Popular Links</h2>
<ul style={{ listStyleType: 'none'}}>
<li><a href="/modules/usage/Installation">How to Run OpenHands</a></li>
<li><a href="/modules/usage/prompting/microagents-repo">Customizing OpenHands to a repository</a></li>
<li><a href="/modules/usage/how-to/github-action">Integrating OpenHands with Github</a></li>
<li><a href="/modules/usage/llms#model-recommendations">Recommended models to use</a></li>
<li><a href="/modules/usage/runtimes#connecting-to-your-filesystem">Connecting OpenHands to your filesystem</a></li>
</ul>
</div>
</Layout>
);
}

0 comments on commit cc0c910

Please sign in to comment.