Closed adamish closed 1 year ago
Are you adding a GitHub token via config, env variables or any other method?
`lancaster-university` forbids access via a personal access token (classic). Please use a GitHub App, OAuth App, or a personal access token with fine-grained permissions."}
That suggest a "normal" PAT was used and the Lancaster GitHub org rejected it.
I had a similar error in the opposite direction last week, when I added a GitHub personal fined-grain access token it complained I could not use that. Changing it to use the older "standard" PAT seemed to work. Weird.
@JohnVidler we are seeing more GH PAT weirdness with the Lancaster org, was something changed this week?
A bit more information...
1) I've since discovered that yotta uses environment variable YOTTA_GITHUB_AUTHTOKEN
. I was incorrectly using gh auth login
2) pxt target microbit defaults to 4.0.24 (this is the latest on npm registry)
I've tried npm install pxt-microbit@5.0.12
however this removes node_modules/pxtcli.json
which means you need to run pxt target microbit
again
So in summary the following is a recipe that works for me - from a clean repo
export YOTTA_GITHUB_AUTHTOKEN="my token..."
export PXT_NODOCKER=1
npm install pxt-microbit@5.0.12
pxt target microbit
pxt install
pxt build --local
Issue caused by default 4.0.24. workound in comments
https://makecode.com/cli provides documentation of how to build locally, however this appears to now be outdated. There are a number of pitfalls and finding information on this topic is difficult.
To Reproduce 1) Run pxt build 2) Run pxt localbuild (this is documented on https://makecode.com/cli/build) 3) Run pxt build --local
Expected behaviour A successful build
Actual behaviour 1)
2) Command 'localbuild' not found -
3) Fails with errors warning: connection error: bad handshake: Error([('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')],), retrying.
Analysis of above 1) Some kind of login is required, but this is not documented how 2) This appears to have been changed to build --local, however documentation at https://makecode.com/cli/build still states localbuild 3) Appears that underlying yotta registry has been deprecated (https://support.microbit.org/support/solutions/articles/19000123284-arm-yotta-registry-deprecation) but the docker image is still trying to use it?
micro:bit version (please complete the following information):
Version 2
Desktop (please complete the following information):