401 Error running API call through github-script

Aperta
#324 3 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
github, github-actions, javascript, postman, typescript

Direzione di ricerca

Start with the attached list-repo-status.yml workflow and debug log, then compare the last successful run with the first failing run. Check how github-script 6.3.3 receives and uses the organization secret, using the Postman result as a token-behavior comparison. Done means the workflow authenticates successfully and produces the repository list.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

question

Edit: link to first failure
I am getting 401 “Bad Credentials” trying to run some api calls through github-script. This was working on Monday (Jan 9) but stopped working on Tuesday (Jan 10)

I have contacted GitHub Support and they have been able to reproduce the error. They say it is most likely due to the 3rd party action, "github-script" (6.3.3) causing this issue.
https://support.github.com/ticket/enterprise/15636/1960901

Steps to reproduce

  1. Create PAT with Admin access (r/w) to repos and org/teams
    
  2. Set an Org secret using the value from my PAT
    
  3. Run the workflow manually (or from a push)
    
  4. Failure with 401 error
    

Expected to produce a list of repositories
I have pared down the workflow to isolate the issue. Attached is the workflow (list-repo-status.yml) and the debug log
list-repo-status.yml
list-repo-status.debug.log.txt

Last successful run can be found:
https://github.com/teamkfinteg/reportscripts/actions/runs/3878744215

First failure (only difference was trying to replace trigger with cron
https://github.com/teamkfinteg/reportscripts/actions/runs/3885391826

I used Postman with the same token to test and it works as expected.

Desktop (please complete the following information):

  • OS: Win10
  • Browser: Firefox
  • Version: 108.0.2 (64-bit)
Lingua principale
TypeScript
Stelle
5k
Fork
586
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di actions/github-script

Tutte le issue di actions/github-script

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.