0

GHA workflow step:

- name: create release
  run: |
    gh release create v1.0.0 --repo myrepoowner/myrepositoryname/Release --title "My Release" --notes "This is the first version of my project."
  env:
    GITHUB_TOKEN: ${{ secrets.PAT }}

Error:

Run gh release create v1.0.0 --repo myrepoowner/myrepositoryname/Release --title "My Release" --notes "This is the first version of my project."
error connecting to myrepoowner
check your internet connection or https://githubstatus.com
Error: Process completed with exit code 1.

githubstatus LOGS:

Git Operations ?
Normal
API Requests ?
Normal
Webhooks ?
Normal
Issues ?
Normal
Pull Requests ?
Normal
Actions ?
Normal
Packages ?
Normal
Pages ?
Normal
Codespaces ?
Normal
Copilot
Normal

Getting the same error logs again and again. Any suggestion would be helpful.

  • According to [Using GitHub CLI in workflows](https://docs.github.com/en/actions/using-workflows/using-github-cli-in-workflows), you need to configure `GITHUB_TOKEN`, not `GH_TOKEN`. Replace `GH_TOKEN` with `GITHUB_TOKEN` and try again. – Azeem Jun 01 '23 at 10:32
  • Thanks @Azeem , but error is still there . Error: error connecting to myrepoowner name check your internet connection or https://githubstatus.com – jackazjimmy Jun 01 '23 at 11:00
  • Checking https://githubstatus.com/ shows that all services are operational on your side? For me, everything seems to be fine. Also, what kind of permissions `PAT` has? And, why are you not using `GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}`? – Azeem Jun 01 '23 at 11:05
  • For the test purpose I have provided all the access to the PAT, and github action doesn't allow to create variable starting with GITHUB. @Azeem is there any other steps i need to follow as i am using the organization internal repo in my enterprise subscription. But in the public or private repository it is creating the release other than enterprise. – jackazjimmy Jun 01 '23 at 12:27
  • You don't have to create `GITHUB_TOKEN` secret. It's [automatically created](https://docs.github.com/en/actions/security-guides/automatic-token-authentication) and should already be there by default. Please [edit](https://stackoverflow.com/posts/76380494/edit) your question and add your new step under an **UPDATE** section. – Azeem Jun 01 '23 at 12:33
  • HEY @Azeem , i update the code and added status logs aswell. – jackazjimmy Jun 02 '23 at 08:55
  • Not the GitHub status logs, the logs of your GitHub Actions workflow run after updating the env var. – Azeem Jun 02 '23 at 09:25

0 Answers0