ssh-action icon indicating copy to clipboard operation
ssh-action copied to clipboard

OAuth 403 Forbidden Error

Open devspacenine opened this issue 2 years ago • 2 comments

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

devspacenine avatar Dec 15 '23 03:12 devspacenine

me too

idas4you avatar Dec 18 '23 01:12 idas4you

Same for me.

tienhuynh17 avatar Jan 08 '24 04:01 tienhuynh17