Access GitHub Package binary from an EC2 instance using Tokens

Hi, trying to install binary package from Gihub Packages into an AWS EC2 instance, I get a weird HTTP error “permanently moved” when making the request from EC2. I tried both using a PAT Personat Access Token and a GITHUB_TOKEN in a context of a workflow action. It failed in both cases. Any ideas ?

And I just found that using curl requires the -L flag to follow redirects … Hopefully this topic will help anyone having the same issue. Still wondering why the token from Github action is not authorized. I’m guessing the startup scripts on EC2 instance may be run asychronously and the token is revoked before curl has a chance to get a go