You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to use octocrab to replace a bash script which uses gh api, however I can't get the authentication to work.
For the folllowing code
/// this token has the required permissons per the github documentation and works fine when using `gh api`let auth_token = std::env::var("GITHUB_TOKEN").context("GITHUB_TOKEN is required to authenticate with the Github API")?;let crab = octocrab::OctocrabBuilder::new().personal_token(auth_token).build().context("Failed to construct Octocrab configuration")?;let jit_config = crab
.actions().create_repo_jit_runner_config(
config.owner,
config.repo,
config.name,
config.runner_group_id.into(),
config.labels,).send().await?;
Can octocrab only be used for making github apps or am I doing something wrong here? As mentioned above the same token works perfectly when using gh api.
The text was updated successfully, but these errors were encountered:
I've been trying to use
octocrab
to replace a bash script which usesgh api
, however I can't get the authentication to work.For the folllowing code
Octocrab gives this error:
Can octocrab only be used for making github apps or am I doing something wrong here? As mentioned above the same token works perfectly when using
gh api
.The text was updated successfully, but these errors were encountered: