github
Web-based version-control and collaboration.
total methods: 835
total selectable resources: 237
See also:
[SHOW
] [DESCRIBE
] [REGISTRY
]
Installation
To pull the latest version of the github
provider, run the following command:
REGISTRY PULL github;
To view previous provider versions or to pull a specific provider version, see here.
Authentication
The STACKQL_GITHUB_CREDS
environment variable is used by default to store credentials to authorize requests to GitHub. This variable is sourced at runtime (from the local machine or as a CI variable/secret). Use a GitHub Developer or Personal Access Token along with your GitHub username to populate this variable as follows:
export STACKQL_GITHUB_CREDS=$(echo -n 'yourusername:ghp_YOURPERSONALACCESSTOKEN' | base64)
or using PowerShell:
$env:STACKQL_GITHUB_CREDS = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("yourusername:ghp_YOURPERSONALACCESSTOKEN"))
Using a different environment variable
To use a different environment variable (instead of the default), use the --auth
flag of the stackql
program. For example:
export YOUR_GITHUB_CREDS_VAR=$(echo -n 'yourusername:ghp_YOURPERSONALACCESSTOKEN' | base64)
AUTH='{ "github": { "type": "basic", "credentialsenvvar": "YOUR_GITHUB_CREDS_VAR" } }'
stackql shell --auth="${AUTH}"
or using PowerShell:
$env:YOUR_GITHUB_CREDS_VAR = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("yourusername:ghp_YOURPERSONALACCESSTOKEN"))
$Auth = "{ 'github': { 'type': 'basic', 'credentialsenvvar': 'YOUR_GITHUB_CREDS_VAR' } }"
stackql.exe shell --auth=$Auth
Environment variables beginning with GITHUB_
are not allowed within GitHub action workflows. If you need to use the StackQL GitHub provider from GitHub Actions, choose a different prefix.