I'm hitting random 401s when running generate on some of our CI agents with the following error: 'Expiration time' claim ('exp') is too far in the future
After some digging, I found two issues:
-
The default JWT expiry is 10 minutes, which is exactly GitHub's maximum. If the machine's clock is even a couple seconds behind, GitHub sees the exp as exceeding the limit and rejects it.
-
The --duration flag doesn't actually work because the code reads c.Int("jwt-expiry") but the flag is registered as "duration"
I propose #68 to fix both issues.
Thanks 🙏
I'm hitting random 401s when running
generateon some of our CI agents with the following error: 'Expiration time' claim ('exp') is too far in the futureAfter some digging, I found two issues:
The default JWT expiry is 10 minutes, which is exactly GitHub's maximum. If the machine's clock is even a couple seconds behind, GitHub sees the
expas exceeding the limit and rejects it.The
--durationflag doesn't actually work because the code readsc.Int("jwt-expiry")but the flag is registered as"duration"I propose #68 to fix both issues.
Thanks 🙏