I am getting this error:
failed to initialize client: failed to unmarshal spec: json: cannot unmarshal object into Go struct field Spec.app_auth of type []client.AppAuthSpec
Can someone help me troubleshoot this issue?
I am getting this error:
failed to initialize client: failed to unmarshal spec: json: cannot unmarshal object into Go struct field Spec.app_auth of type []client.AppAuthSpec
Can someone help me troubleshoot this issue?
Hi @decent-viper!
Could you post a redacted (no secrets!) config here?
I think there might be an issue with the cfg structure, so I’ll need to see the cfg used.
kind: source
spec:
# Source spec section
name: github
path: cloudquery/github
registry: cloudquery
version: "v8.0.1"
tables: [
"github_installations",
"github_hooks",
"github_repository_keys",
"github_releases",
"github_organization_dependabot_alerts",
"github_repository_sboms",
"github_teams",
"github_team_members",
"github_team_repositories",
"github_organizations",
"github_organization_members",
"github_repositories",
"github_workflows"]
destinations: ["postgresql"]
spec:
app_auth:
private_key: |
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
private_key_path: path.pem
app_id: xxxxxx # App ID, required for App Authentication.
installation_id: xxxxxxx # Installation ID for this org
orgs: ['my_org']
Hi this is my config.
From the docs:
You can define either private_key
or private_key_path
in the configuration, but not both.
So, if the file is accessible to the plugin, I suggest using that instead of the cfg option.
Ah.
App auth is an array (Array of structs?).
See this part in the example:
# app_auth:
# - org: cloudquery
# private_key: <
spec:
app_auth:
private_key_path: private-key.pem
app_id: "123456"
installation_id: "1234567"
I’m getting the following error:
Missing personal access token or app auth in configuration.
What can I do to resolve this?
- org: cloudquery
private_key: |
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEA3eVv6PCn9P8zO+EP8K7pLMfxcA2uVrSZ2f+H3GgYIavDxWtO
vM9tE3jAA8mOjZpdLaG5yy4QfV1LQ3R7kO49JCB6VbClwN2lNvd8Iw49JCBDid7D
...
-----END RSA PRIVATE KEY-----
app_id: your_app_id
And see that before org
you have dash indicating an element of the array.
it works
thank you
tables: [
"github_installations",
"github_hooks",
"github_repositories",
"github_teams",
"github_team_members",
"github_team_repositories",
"github_organizations",
"github_organization_members",
"github_repository_sboms"]
skip_tables:
- github_billing_action
- github_billing_package
- github_billing_storage
- github_external_groups
- github_hook_deliveries
- github_traffic_clones
- github_traffic_paths
- github_traffic_referrers
- github_traffic_views
- github_organization_dependabot_secrets
- github_organization_dependabot_alerts
- github_releases
- github_release_assets
- github_repository_dependabot_secrets
- github_repository_dependabot_alerts
- github_repository_keys
- github_workflow_run_usage
- github_workflow_jobs
- github_repository_branches
- github_workflow_runs
Try logging more (use debug log level?) to see if you hit some rate limits.