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

GitHub release failed with status: 403 #236

Closed
donkeyx opened this issue Jun 2, 2022 · 9 comments
Closed

GitHub release failed with status: 403 #236

donkeyx opened this issue Jun 2, 2022 · 9 comments

Comments

@donkeyx
Copy link

donkeyx commented Jun 2, 2022

Hey guys,

I am getting a 403 when pushing a release using the action. I have attached the config and a screenshot of my security settings which should be ok. Any help appreciated >

code block <<

      - name: Release with Notes
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          draft: false
          generate_release_notes: true
          files: |
            bin/tcp-wait.arm64
            bin/tcp-wait.darwin.amd64
            bin/tcp-wait.linux.amd64
            bin/tcp-wait.windows.amd64
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

error <<

Run softprops/action-gh-release@v1
👩‍🏭 Creating new GitHub release for tag v0.0.1-test...
⚠️ GitHub release failed with status: 403
undefined
retrying... (2 retries remaining)
👩‍🏭 Creating new GitHub release for tag v0.0.1-test...
⚠️ GitHub release failed with status: 403
undefined
retrying... (1 retries remaining)
👩‍🏭 Creating new GitHub release for tag v0.0.1-test...
⚠️ GitHub release failed with status: 403
undefined
retrying... (0 retries remaining)
❌ Too many retries. Aborting...

workflow permissions <<

image

@muellerk22
Copy link

muellerk22 commented Jun 6, 2022

I'm getting the same 403

Run softprops/action-gh-release@v1
👩‍🏭 Creating new GitHub release for tag v0.0.11...
⚠️ GitHub release failed with status: 403
undefined
retrying... (2 retries remaining)
👩‍🏭 Creating new GitHub release for tag v0.0.[11](https://github.com/Cloudzero/amazon-cloudwatch-agent/runs/6749363256?check_suite_focus=true#step:16:12)...
⚠️ GitHub release failed with status: 403
undefined
retrying... (1 retries remaining)
👩‍🏭 Creating new GitHub release for tag v0.0.11...
⚠️ GitHub release failed with status: 403
undefined
retrying... (0 retries remaining)
❌ Too many retries. Aborting...
Error: Too many retries.
      - name: Release
        if: ${{ github.ref == 'refs/heads/cloudzero-optimized' }}
        uses: softprops/action-gh-release@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          name: V${{ env.NEXT_TAG }}
          tag_name: v${{ env.NEXT_TAG }}

I have the same workflow permissions too.

@ArjanJ
Copy link

ArjanJ commented Jun 9, 2022

I resolved this by adding this to my yml workflow file

permissions:
  contents: write

@raviqqe
Copy link

raviqqe commented Jun 25, 2022

You might also need to disable tag protection rules in your repository if any are defined.

linonetwo added a commit to tiddly-gittly/tiddlywiki-whiteboard that referenced this issue Nov 27, 2022
linonetwo added a commit to tiddly-gittly/tiddlywiki-whiteboard that referenced this issue Dec 7, 2022
jhdcruz pushed a commit to jhdcruz/kipher that referenced this issue Jan 6, 2023
@dionysius dionysius mentioned this issue Jan 10, 2023
MaybeJustJames added a commit to GiadaLalli/ISN-tractor that referenced this issue Jan 13, 2023
Workaround
[this](softprops/action-gh-release#236) bug
in softprops/action-gh-release by giving the GITHUB_TOKEN write
permissions for the repository. Documentation
[here](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs).
@sumanthkumarc
Copy link

#236 (comment) worked for me.

GeckoEidechse added a commit to GeckoEidechse/Temp-Northstar that referenced this issue Mar 6, 2023
PeterXiao added a commit to PeterXiao/emacs-build that referenced this issue Mar 13, 2023
Acgua added a commit to Acgua/ioBroker.fully-mqtt that referenced this issue Mar 19, 2023
-   (Acgua) Github Workflow Deploy - try to fix GitHub release failed with status: 403 undefined ([Link](softprops/action-gh-release#236 (comment)))
luo-anthony added a commit to luo-anthony/python-project-template that referenced this issue Apr 1, 2023
rochacbruno pushed a commit to rochacbruno/python-project-template that referenced this issue Apr 2, 2023
kevinsieverding added a commit to kevinsieverding/dhbw-latex-template that referenced this issue Apr 6, 2023
tandav added a commit to tandav/colortool that referenced this issue Apr 29, 2023
@Timmmm
Copy link

Timmmm commented May 11, 2023

Worth adding this to the readme surely?

mgred added a commit to bzlparty/rules_pandoc that referenced this issue May 12, 2023
this might be the reason for the failures from the first run

softprops/action-gh-release#236 (comment)
metalbass added a commit to metalbass/PyStubbler that referenced this issue May 13, 2023
This should fix "GitHub release failed with status: 403"
Recommended in: softprops/action-gh-release#236
@HinTak
Copy link

HinTak commented Dec 28, 2023

I resolved this by adding this to my yml workflow file

permissions:
  contents: write

would it make sense to include this snipplet in the examples in the top-level README, instead of / in addition of mentioning it at the end? I suppose most people are as lazy as me and just leave the default repository permission alone, copy-and-paste the example and edit a bit to try to get it to work. So it would be nice to have the examples working as-is in most people/organizations' settings.

If the repository-level change is preferred, it probably should be mentioned at the top of the readme, instead of the end. I think having it as a per-job/per-action setting is fine for most people.

AzimsTech added a commit to AzimsTech/OpenWrt-imagebuilder that referenced this issue Jan 1, 2024
pylipp added a commit to pylipp/financeager that referenced this issue Jan 4, 2024
ge69tez added a commit to ge69tez/mcr-analyzer that referenced this issue Jan 24, 2024
zkitefly added a commit to zkitefly/HMCL that referenced this issue Feb 6, 2024
Glavo pushed a commit to HMCL-dev/HMCL that referenced this issue Feb 6, 2024
bessarabov added a commit to bessarabov/golang-sample that referenced this issue Mar 10, 2024
shirokurohitsuji added a commit to shirokurohitsuji/UnityUtilities that referenced this issue Mar 23, 2024
zeerayne added a commit to zeerayne/1cv8-postgresql-config-helper that referenced this issue Mar 24, 2024
hannesa2 added a commit to hannesa2/PlantDiseasesDetector that referenced this issue Apr 2, 2024
matts1 added a commit to matts1/rules-template that referenced this issue May 2, 2024
alexeagle pushed a commit to bazel-contrib/rules-template that referenced this issue May 2, 2024
MeFisto94 added a commit to MeFisto94/ddf-random that referenced this issue Jun 22, 2024
@ajithkumar-natarajan
Copy link

I had to enable this setting at my organization level
image

@donkeyx
Copy link
Author

donkeyx commented Jul 16, 2024

this was resolved with the settings provided by @HinTak <<
permissions:
contents: write
packages: write

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

9 participants