Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub: Stale user token prevent builds from running #2488

Closed
pat-s opened this issue Sep 22, 2023 Discussed in #2482 · 0 comments · Fixed by #2499
Closed

GitHub: Stale user token prevent builds from running #2488

pat-s opened this issue Sep 22, 2023 Discussed in #2482 · 0 comments · Fixed by #2499
Labels
bug Something isn't working forge/github github forge related server

Comments

@pat-s
Copy link
Contributor

pat-s commented Sep 22, 2023

Discussed in #2482

Originally posted by pat-s September 20, 2023
When using WP with GH, everything works fine for a short period of time (some hours) after being logged in freshly.

However, it seems that after some time the user token expires and builds are not triggered anymore

 {"level":"error","error":"Error #01: GET https://api.github.com/repos/<repo-slug>branches?page=1&per_page=50: 401 Bad credentials []\n","ip":"159.100.253.188","latency":265.980774,"method":"GET" │
│ ,"path":"/api/repos/2/branches","status":500,"time":"2023-09-20T07:56:03Z","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 │
│ ","time":"2023-09-20T07:56:03Z"}  

This is especially problematic for CRON builds as these are never triggered then. Also the UI reflects this by showing the following banner

image

A logout and fresh login solves the issue. I wonder: is this something that must be solved on the user side? Which token is actually used here which could expire? The GH auth runs via a self-hosted GH app which is using a client ID and secret.

How is this being handled for the WP instance running in the woodpecker repo here?

According to #2482 (reply in thread) from @qwerty287 this might be a bug in WP.

Happy to help with any logs or additional information.

@pat-s pat-s added bug Something isn't working server forge/github github forge related labels Sep 22, 2023
@pat-s pat-s changed the title GitHub: Stale user token preventing builds from running (?) GitHub: Stale user token prevent builds from running (?) Sep 22, 2023
@qwerty287 qwerty287 changed the title GitHub: Stale user token prevent builds from running (?) GitHub: Stale user token prevent builds from running Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forge/github github forge related server
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant