11# Token Handling
22
3- How the CLI resolves, uses, and secures Personal Access Tokens (PATs) for each plugin connection.
4-
5- Supported today: ** GitHub** , ** GitHub Copilot** , ** GitLab** , ** Azure DevOps** .
3+ How the CLI resolves, uses, and secures Personal Access Tokens (PATs) for each plugin connection.
4+
5+ Supported today: ** GitHub** , ** GitHub Copilot** , ** GitLab** , ** Azure DevOps** .
66
77## Token Resolution Order
88
@@ -29,12 +29,12 @@ AZURE_DEVOPS_PAT=ado_pat_here
2929
3030The CLI checks ** plugin-specific** keys (first match wins):
3131
32- | Plugin | ` .devlake.env ` keys (in order) | Environment variables (in order) |
33- | --------| -------------------------------| ---------------------------------|
34- | GitHub | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` |
35- | GitHub Copilot | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` |
36- | GitLab | ` GITLAB_TOKEN ` , ` GITLAB_PAT ` | ` GITLAB_TOKEN ` , ` GITLAB_PAT ` |
37- | Azure DevOps | ` AZURE_DEVOPS_PAT ` , ` AZDO_PAT ` | ` AZURE_DEVOPS_PAT ` , ` AZDO_PAT ` |
32+ | Plugin | ` .devlake.env ` keys (in order) | Environment variables (in order) |
33+ | --------| -------------------------------| ---------------------------------|
34+ | GitHub | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` |
35+ | GitHub Copilot | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` | ` GITHUB_PAT ` , ` GITHUB_TOKEN ` , ` GH_TOKEN ` |
36+ | GitLab | ` GITLAB_TOKEN ` , ` GITLAB_PAT ` | ` GITLAB_TOKEN ` , ` GITLAB_PAT ` |
37+ | Azure DevOps | ` AZURE_DEVOPS_PAT ` , ` AZDO_PAT ` | ` AZURE_DEVOPS_PAT ` , ` AZDO_PAT ` |
3838
3939By default, the CLI looks for ` .devlake.env ` in the current directory. Override the path with ` --env-file ` :
4040
@@ -52,13 +52,13 @@ As a final fallback, the CLI prompts you to paste the token at the terminal. Inp
5252
5353## Required PAT Scopes
5454
55- | Plugin | Required Scopes |
56- | --------| ----------------|
57- | GitHub | ` repo ` , ` read:org ` , ` read:user ` |
58- | GitHub Copilot | ` manage_billing:copilot ` , ` read:org ` |
59- | GitHub Copilot (enterprise) | + ` read:enterprise ` |
60- | GitLab | ` read_api ` , ` read_repository ` |
61- | Azure DevOps | PAT with repo + pipeline access (no OAuth scopes) |
55+ | Plugin | Required Scopes |
56+ | --------| ----------------|
57+ | GitHub | ` repo ` , ` read:org ` , ` read:user ` |
58+ | GitHub Copilot | ` manage_billing:copilot ` , ` read:org ` |
59+ | GitHub Copilot (enterprise) | + ` read:enterprise ` |
60+ | GitLab | ` read_api ` , ` read_repository ` |
61+ | Azure DevOps | PAT with repo + pipeline access (no OAuth scopes) |
6262
6363The CLI displays required scopes as a reminder before prompting for the token.
6464
0 commit comments