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 have used the github action setup to create my metrics but it fails with error "Bad Credentials" when github action is triggered. I have created a secret in my repository called METRICS_TOKEN and assigned the token value.
My yaml file is this:
# Visit https://github.com/lowlighter/metrics#-documentation for full referencename: Metricson:
# Schedule updates (each hour)schedule: [{cron: "0 * * * *"}]# Lines below let you run workflow manually and on each commitworkflow_dispatch:
push: {branches: ["master", "main"]}jobs:
github-metrics:
runs-on: ubuntu-latestpermissions:
contents: writesteps:
- uses: lowlighter/metrics@latestwith:
# Your GitHub token# The following scopes are required:# - public_access (default scope)# The following additional scopes may be required:# - read:org (for organization related metrics)# - read:user (for user related data)# - read:packages (for some packages related data)# - repo (optional, if you want to include private repositories)token: ${{ secrets.METRICS_TOKEN }}# Optionsuser: NikosDevtemplate: classicbase: header, activity, community, repositories, metadataconfig_timezone: Europe/Athens
My github action error:
Github action error log:
─────Metrics │ Setup │ completeVersion │ 3.34.0Using prebuilt image │ trueDebug mode │ falseDebug flags │ (none)GitHub token │ (provided)GitHub token format │ classicGitHub GraphQL API │ okGitHub GraphQL API endpoint │ (default)GitHub REST API │ okGitHub REST API endpoint │ (default)API requests (REST) │ (unknown)API requests (GraphQL) │ (unknown)API requests (Search) │ (unknown)Token validity │ (could not verify)GitHub account │ NikosDevCurrent repository │ NikosDev/NikosDevCommitter token │ (provided)Committer branch │ mainCommitter head branch │ mainCommitter REST API │ okCommitter account │ (github-actions)Committer head branch status │ okPrevious render sha │ (none)SVG output │ github-metrics.svgSVG optimization │ css, xmlSVG verification after generation │ false────────────────────────────────────────────────────────────────────────────────────────Templates │ Community templates │ (none)Template used │ classicQuery additional params │ {}────────────────────────────────────────────────────────────────────────────────────────Core │ Markdown template path │ TEMPLATE.mdExtra CSS │ Extra JavaScript │ Timezone for dates │ Europe/AthensPlugin order │ Use twemojis │ falseUse GitHub custom emojis │ trueUse GitHub octicons │ falseDisplay width (for image output formats) │ regularUse CSS animations │ trueBase64-encoded images │ trueOutput padding │ 0, 8 + 11%Output format │ autoConfiguration presets │ Notice about new releases of metrics │ trueExperimental features │ Plugin errors │ (displayed in generated image)────────────────────────────────────────────────────────────────────────────────────────Base content │ Fetched repositories │ 100Indepth mode │ falseShow `Available for hire!` in header section │ falseSkip base content │ falseFetched repositories per query │ 100Include forks │ falseRepositories affiliations │ ownerDefault skipped repositories │ Default ignored users │ github-actions[bot],dependabot[bot],dependabot-preview[bot],actions-user,[email protected]Identifiers that has been used for authoring commits │ .user.loginBase sections │ header, activity, community, repositories, metadata────────────────────────────────────────────────────────────────────────────────────────Rendering │ RequestError [HttpError]: Bad credentialsat /metrics/node_modules/@octokit/graphql/node_modules/@octokit/request/dist-node/index.js:112:21at process.processTicksAndRejections (node:internal/process/task_queues:95:5)at async Object.default [as base] (file:///metrics/source/plugins/base/index.mjs:32:23)at async metrics (file:///metrics/source/app/metrics/index.mjs:79:5)at async retry.retries.retries (file:///metrics/source/app/action/index.mjs:407:40)at async retry (file:///metrics/source/app/action/index.mjs:57:22)at async file:///metrics/source/app/action/index.mjs:406:28 {────────────────────────────────────────────────────────────────────────────────────────undefinedAn error occurred, logging debug message :
TypeError: Cannot read properties of null (reading 'oid')at file:///metrics/source/app/action/index.mjs:307:38at process.processTicksAndRejections (node:internal/process/task_queues:95:5)Attempt 1/3metrics/compute/NikosDev > start{template: 'classic','debug.flags': '',markdown: 'TEMPLATE.md','extras.css': '','extras.js': '','config.timezone': 'Europe/Athens','config.order': [],'config.twemoji': false,'config.gemoji': true,'config.octicon': false,'config.display': 'regular','config.animations': true,'config.base64': true,'config.padding': '0, 8 + 11%','config.output': 'auto','config.presets': [],'notice.releases': true,'experimental.features': [],hireable: false,skip: false,'repositories.batch': 100,'repositories.forks': false,'repositories.affiliations': [ 'owner' ],'repositories.skipped': [],'users.ignored': ['github-actions[bot]','dependabot[bot]','dependabot-preview[bot]','actions-user','[email protected]'],'commits.authoring': [ '.user.login' ],base: false,'base.header': true,'base.activity': true,'base.community': true,'base.repositories': true,'base.metadata': true,'base.indepth': false}metrics/compute/NikosDev > output format set to svgmetrics/compute/NikosDev > content order : base.header,introduction,base.activity+community,base.repositories,lines,followup,discussions,languages,notable,projects,repositories,gists,pagespeed,habits,topics,music,nightscout,posts,rss,tweets,isocalendar,calendar,stars,starlists,stargazers,people,activity,reactions,anilist,wakatime,skyline,support,stackoverflow,leetcode,stock,achievements,screenshot,code,chess,sponsors,sponsorships,poopmap,16personalities,fortune,splatoon,steammetrics/compute/NikosDev > computemetrics/compute/NikosDev/base > startedmetrics/compute/NikosDev/base > affiliations constraints , ownerAffiliations: [OWNER], affiliations: [OWNER]metrics/compute/NikosDev/base > account usermetrics/compute/NikosDev/base > account user > failed : HttpError: Bad credentialsWarning: Bad credentialsAttempt 2/3Warning: Bad credentialsAttempt 3/3Warning: Bad credentialsError: Bad credentialsError: Process completed with exit code 1.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have used the github action setup to create my metrics but it fails with error "Bad Credentials" when github action is triggered. I have created a secret in my repository called METRICS_TOKEN and assigned the token value.
My yaml file is this:
My github action error:
Github action error log:
Beta Was this translation helpful? Give feedback.
All reactions