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

OAuth 403 Forbidden Error #284

Open
devspacenine opened this issue Dec 15, 2023 · 2 comments
Open

OAuth 403 Forbidden Error #284

devspacenine opened this issue Dec 15, 2023 · 2 comments

Comments

@devspacenine
Copy link

devspacenine commented Dec 15, 2023

I've been using ssh-action in my actions successfully for a few months. A couple days ago, with no changes to my actions, I started getting intermittent 403 forbidden errors from OAuth requests when building appleboy/ssh-action before my jobs start. The issue seems to resolve 30-40 minutes later, only to pop up again within the next hour. I am using self-hosted runners so I don't think this has anything to do with spending limits in my github org. I upped my spending limits, but still run into the issue intermittently.

I've also attempted to curl the OAuth urls manually from the servers to make sure it wasn't some firewall issue on my side, but I am able to successfully hit the OAuth urls from these hosts while the issue is happening.

Build container for action use: '/home/devteam/actions-runner/_work/_actions/appleboy/ssh-action/v[1](https://github.com/CSVentures/mealsuite-core/actions/runs/7217368485/job/19665064271#step:2:1).0.0/Dockerfile'.
  /usr/bin/docker build -t 3e558f:9a5f0c43711f41538c9[2](https://github.com/CSVentures/mealsuite-core/actions/runs/7217368485/job/19665064271#step:2:2)b856f4c0bea4 -f "/home/devteam/actions-runner/_work/_actions/appleboy/ssh-action/v1.0.0/Dockerfile" "/home/devteam/actions-runner/_work/_actions/appleboy/ssh-action/v1.0.0"
  #0 building with "default" instance using docker driver
  
  #1 [internal] load .dockerignore
  #1 transferring context: 2B done
  #1 DONE 0.0s
  
  #2 [internal] load build definition from Dockerfile
  #2 transferring dockerfile: 170B done
  #2 DONE 0.0s
  
  #3 [auth] appleboy/drone-ssh:pull token for ghcr.io
  #3 DONE 0.0s
  
  #4 [internal] load metadata for ghcr.io/appleboy/drone-ssh:1.7.0
  #4 ERROR: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aappleboy%2Fdrone-ssh%3Apull&service=ghcr.io: 403 Forbidden
  ------
   > [internal] load metadata for ghcr.io/appleboy/drone-ssh:1.7.0:
  ------
  Dockerfile:1
  --------------------
     1 | >>> FROM ghcr.io/appleboy/drone-ssh:1.7.0
     2 |     
     3 |     COPY entrypoint.sh /entrypoint.sh
  --------------------
  ERROR: failed to solve: ghcr.io/appleboy/drone-ssh:1.7.0: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aappleboy%2Fdrone-ssh%3Apull&service=ghcr.io: 403 Forbidden
  Warning: Docker build failed with exit code 1, back off 2.674 seconds before retry.
  /usr/bin/docker build -t 3e558f:9a5f0c43711f41538c92b856f4c0bea4 -f "/home/devteam/actions-runner/_work/_actions/appleboy/ssh-action/v1.0.0/Dockerfile" "/home/devteam/actions-runner/_work/_actions/appleboy/ssh-action/v1.0.0"
  #0 building with "default" instance using docker driver
  
  #1 [internal] load .dockerignore
  #1 transferring context: 2B done
  #1 DONE 0.0s
  
  #2 [internal] load build definition from Dockerfile
  #2 transferring dockerfile: 170B done
  #2 DONE 0.0s
  
  #[3](https://github.com/CSVentures/mealsuite-core/actions/runs/7217368485/job/19665064271#step:2:3) [auth] appleboy/drone-ssh:pull token for ghcr.io
  #3 DONE 0.0s
  
  #4 [internal] load metadata for ghcr.io/appleboy/drone-ssh:1.7.0
  #4 ERROR: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aappleboy%2Fdrone-ssh%3Apull&service=ghcr.io: 403 Forbidden
  ------
   > [internal] load metadata for ghcr.io/appleboy/drone-ssh:1.7.0:
  ------
  Dockerfile:1
  --------------------
     1 | >>> FROM ghcr.io/appleboy/drone-ssh:1.7.0
     2 |     
     3 |     COPY entrypoint.sh /entrypoint.sh
  --------------------
  ERROR: failed to solve: ghcr.io/appleboy/drone-ssh:1.7.0: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aappleboy%2Fdrone-ssh%3Apull&service=ghcr.io: 403 Forbidden
  Warning: Docker build failed with exit code 1, back off 2.036 seconds before retry.
  /usr/bin/docker build -t 3e558f:9a5f0c43711f41538c92b856f4c0bea4 -f "/home/devteam/actions-runner/_work/_actions/appleboy/ssh-action/v1.0.0/Dockerfile" "/home/devteam/actions-runner/_work/_actions/appleboy/ssh-action/v1.0.0"
  #0 building with "default" instance using docker driver
  
  #1 [internal] load .dockerignore
  #1 transferring context: 2B done
  #1 DONE 0.0s
  
  #2 [internal] load build definition from Dockerfile
  #2 transferring dockerfile: 170B done
  #2 DONE 0.0s
  
  #3 [auth] appleboy/drone-ssh:pull token for ghcr.io
  #3 DONE 0.0s
  
  #[4](https://github.com/CSVentures/mealsuite-core/actions/runs/7217368485/job/19665064271#step:2:4) [internal] load metadata for ghcr.io/appleboy/drone-ssh:1.[7](https://github.com/CSVentures/mealsuite-core/actions/runs/7217368485/job/19665064271#step:2:7).0
  #4 ERROR: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aappleboy%2Fdrone-ssh%3Apull&service=ghcr.io: 403 Forbidden
  ------
   > [internal] load metadata for ghcr.io/appleboy/drone-ssh:1.7.0:
  ------
  Dockerfile:1
  --------------------
     1 | >>> FROM ghcr.io/appleboy/drone-ssh:1.7.0
     2 |     
     3 |     COPY entrypoint.sh /entrypoint.sh
  --------------------
  ERROR: failed to solve: ghcr.io/appleboy/drone-ssh:1.7.0: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Aappleboy%2Fdrone-ssh%3Apull&service=ghcr.io: [40](https://github.com/CSVentures/mealsuite-core/actions/runs/7217368485/job/19665064271#step:2:40)3 Forbidden
Error: Docker build failed with exit code 1
@idas4you
Copy link

me too

@tienhuynh17
Copy link

Same for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants