Git providers
AFK can clone remote repositories for Docker sessions through GitHub App installations, Git OAuth provider accounts, or manually entered clone URLs with tokens.
Supported connection paths
| Path | Best for | How it works |
|---|---|---|
| GitHub App | GitHub organisations and private repo pickers. | AFK lists repositories the installation can access and uses short-lived installation tokens for clone. |
| Git OAuth provider | GitHub, GitLab, Bitbucket, Azure DevOps, Gitea/Forgejo, and custom providers. | Users connect an OAuth account; the spawn modal can browse repositories and refs. |
| Manual Git URL | Public repos, SSH URLs, one-off private HTTPS clones, or unsupported providers. | Paste a clone URL and optionally an access token in the spawn modal or automation form. |
GitHub App
- Open Account → Git.
- Connect or activate a GitHub App provider.
- Install the app on the GitHub user or organisation that owns the repositories.
- Return to AFK and verify the installation appears.
- Open New session → Git picker and select the GitHub App source.
GitHub App clone tokens are short-lived and are requested only when a remote Docker session or automation starts. This avoids storing personal access tokens in saved spawn forms.
OAuth providers
Account → Git can define OAuth providers and connect user accounts. AFK includes presets for common services and a custom option for compatible internal hosts.
| Provider | Default web URL | Typical scopes |
|---|---|---|
| GitHub.com | https://github.com | repo read:user |
| GitLab.com | https://gitlab.com | read_user read_api read_repository write_repository |
| Bitbucket Cloud | https://bitbucket.org | account repository |
| Azure DevOps | https://dev.azure.com | vso.code vso.profile |
| Gitea / Forgejo | Self-hosted | read:user read:repository |
The OAuth callback URL is shown in the UI and has this shape:
https://<your-afk-host>/api/git/oauth/callbackFor self-managed GitLab or Gitea/Forgejo, create the OAuth application in that provider's user/admin settings, paste the client ID and secret into AFK, and choose whether AFK should reach the provider from the server or through a daemon.
Network mode
Provider network mode controls where repository and OAuth API calls are made. Use server for public SaaS providers reachable by the AFK hub. Use daemon when the Git provider is only reachable from your company network or a specific machine.
Using the Git picker
- Click New session.
- Choose Git picker.
- Select GitHub App or OAuth account when both are available.
- Pick the connected account, repository, and optionally a branch or tag.
- Set CPU/memory limits, model, permission mode, and task prompt.
Manual clone URL fallback
Choose Clone URL · advanced when you want to enter a clone URL directly. Public repositories and SSH URLs can usually leave Access token blank. For private HTTPS URLs, use a GitHub PAT, GitLab token, or another provider token with clone access. GitLab.com and self-managed GitLab clone URLs are supported here.
Repository checks before a session starts
AFK validates manual repository input before saving or starting a session. Installer commands, daemon keys, embedded credentials, and repository pages such as GitHub Actions or GitLab pipelines are not clone URLs. When AFK recognizes a GitHub or GitLab page, it converts the pasted value to the repository root. The selected connected machine then checks repository access before AFK creates the session.
- If the repository is not found, verify the owner and repository name.
- If authentication fails, connect the Git provider or use a token with clone access.
- If the host cannot be reached, confirm that the selected machine can access the Git host or company network.