GitHub

Connect your GitHub account to Memex for repository access and API operations.

What is GitHub?

GitHub is the world's largest code hosting platform, used for version control and collaboration. When you connect GitHub to Memex, you can access repositories, analyze code, and perform API operations through natural conversation.

What You'll Need

To connect GitHub to Memex, you'll need a Personal Access Token:

Credential
Description
Example

Personal Access Token

Authentication token for GitHub API

ghp_xxxxxxxxxxxxxxxxxxxx

Creating a Personal Access Token

Step 1: Open GitHub Settings

  1. Click your profile photo in the top-right corner

  2. Select Settings

Step 2: Navigate to Developer Settings

  1. Scroll down the left sidebar

  2. Click Developer settings (near the bottom)

  3. Click Personal access tokens

  4. Click Fine-grained tokens

Step 3: Generate a New Token

  1. Click Generate new token

  2. Enter a Token name (e.g., "Memex Access")

  3. Set an Expiration date

  4. Under Resource owner, select your personal account or an organization you have access to

  5. Under Repository access, select which repositories the token can access

  6. Under Permissions, grant the permissions you need:

    • Contents: Read (to view repository files)

    • Metadata: Read (required for all tokens)

    • Add other permissions based on your needs

  7. Click Generate token

Organization Considerations

circle-info

Organization tokens may require approval

If you select an organization as the resource owner for a fine-grained token:

  • The organization may require approval before the token becomes active

  • Check with your organization administrator if your token isn't working

Step 4: Copy Your Token

circle-exclamation
GitHub fine-grained personal access token page

Connecting to Memex

  1. Open the Memex Hub from the sidebar

  2. Click on the Connectors tab

  3. Click on the GitHub card

  4. Enter a Connection Name (e.g., "My GitHub Account")

  5. Paste your Personal Access Token

  6. Click Add Connection

Your GitHub account is now connected! Memex can access it across all your conversations.

Using Your Connection

Once connected, you can ask Memex to work with your GitHub data:

Choosing Token Permissions

For reading repositories and code, these permissions are sufficient:

  • Contents: Read

  • Metadata: Read (required)

If you want Memex to create issues or pull requests, add these permissions:

  • Issues: Read and write

  • Pull requests: Read and write

For detailed permission information, see GitHub's token documentationarrow-up-right.

Security Considerations

Token Security

  • Your token is stored securely in Memex's encrypted storage

  • Never share your token publicly or commit it to a repository

  • GitHub automatically scans for leaked tokens and can revoke them

Token Expiration

  • Set an expiration date for better security

  • GitHub recommends rotating tokens periodically

  • You'll need to update your Memex connection when tokens expire

Revoking Access

If you need to revoke Memex's access:

  1. Delete the connection in Memex Hub

  2. Go to GitHub Settings → Developer settings → Personal access tokens

  3. Delete or revoke the token you created for Memex

circle-exclamation

Troubleshooting

You can ask the Memex agent to help troubleshoot, but here are a few common problems:

"Bad credentials" Error

  • Verify you copied the entire token without extra spaces

  • Check that the token hasn't expired

  • Ensure the token hasn't been revoked in GitHub settings

"Not Found" Error for Repositories

  • Verify the token has access to the repository

  • Ensure the repository exists and you have access to it

Rate Limiting

  • GitHub limits API requests to 5,000 per hour for authenticated users

  • If you hit rate limits, wait for the limit to reset

  • Consider which operations you're performing frequently

Learn More

Last updated

Was this helpful?