'Github Self-Hosted runner registration auth fails in GCE

I am setting up self hosted runner on the Google compute engine by following the steps as advised by GitHub for Enterprise as follows.

//Create a folder
$ mkdir actions-runner && cd actions-runner

// Download the latest runner package
$ curl -O -L https://github.com/actions/runner/releases/download/v2.273.5/actions-runner-osx-x64-2.273.5.tar.gz

// Extract the installer
$ tar xzf ./actions-runner-osx-x64-2.273.5.tar.gz

And then running the below command to configure the runner.

./config.sh --url https://github.entp-api.com/ENTP/mywebsite_repo --token AAAAA4EGUBEEPAUS2HOK4NTCPO7LS

After running the cmd above the registration authentication fails as below.

enter image description here

Error-

Http response code: Forbidden from 'POST https://github.entp-api.com/api/v3/actions/runner-registration'
<!doctype html><meta charset="utf-8"><meta name=viewport content="width=device-width, initial-scale=1"><title>403</title>403 Forbidden                              
Response status code does not indicate success: 403 (Forbidden).  


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source