GitHub integration
An integration keeps a credential at the Turm edge. VMs reach the service through an internal URL, and the edge adds the credential. The token never enters the VM.
Add GitHub
Section titled “Add GitHub”Pass a GitHub personal access token, or - to read it from stdin:
echo "$GITHUB_TOKEN" | ssh turm.dev integrations add github --name=gh --token=- --repos=acme/api,acme/* --read-only| Flag | Meaning |
|---|---|
--name |
The integration’s name. It becomes part of its URL. |
--token |
A GitHub token, or - for stdin. |
--repos |
Allowed repos: owner/repo or owner/*. |
--read-only |
Refuse pushes and any API call other than GET/HEAD. |
--attach |
Which VMs can use it: auto:all or vm:<vm>,.... |
Use it in a VM
Section titled “Use it in a VM”git clone http://gh.int.turm.dev/acme/api.gitcurl http://gh.int.turm.dev/api/userOther HTTP APIs
Section titled “Other HTTP APIs”The http-proxy type adds a header to every request to any HTTPS API:
ssh turm.dev integrations add http-proxy --name=api --target=https://api.example.com --header='Authorization: Bearer ...'Manage
Section titled “Manage”ssh turm.dev integrations listssh turm.dev integrations remove gh