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

The requested URL returned error: 404 #62

Open
IvanKravchenko773 opened this issue Sep 29, 2022 · 15 comments
Open

The requested URL returned error: 404 #62

IvanKravchenko773 opened this issue Sep 29, 2022 · 15 comments

Comments

@IvanKravchenko773
Copy link

IvanKravchenko773 commented Sep 29, 2022

Hi, I tying to trigger workflow but not in the main branch and it wont work. I used Argument (ref:) with name of branch but always get 404 error. Am I doing something wrong?
image

image

@rabih
Copy link
Contributor

rabih commented Oct 8, 2022

The only thing that comes to mind is the private key you are connecting with does not have access to that repository or that the workflow path is incorrect. "workflows/test3.yml/dispatches" doesn't seem like a proper path.

@tommoyang
Copy link

I was running into this error myself despite using the same setup in other repositories fine - turns out that it's expecting that a workflow exists before the API calls will start working. I manually triggered a workflow run, and then this action started working

@AshwinNmbr
Copy link

@IvanKravchenko773 Did you find a solution? I am facing the same exact error too :(

@IvanKravchenko773
Copy link
Author

@AshwinNmbr no, but I think it just cant work if yml file is not in main branch.

@AshwinNmbr
Copy link

AshwinNmbr commented Nov 17, 2022

I managed to fix it by giving PAT in the args

@Davide-DD
Copy link

Hi everyone, I'm having the exact same problem: I'm trying to execute a workflow in an organization repo (where I'm the owner) but I cannot make it work. I'm specifying both the token and the workflow file name (and also owner and repository path like organization_name/repo_name).
@AshwinNmbr what do you mean by "giving PAT in the args"? The github_token?

@Davide-DD
Copy link

In my case I had a repo with master branch and the other with main branch, so I had to specify "ref" in order to make it work

@scottdickerson
Copy link

does anyone know which specific permissions are needed by the PAT? Is it possible to grant these permissions to the OOTB GITHUB_TOKEN?

@stormeye2000
Copy link

I had the same problem, api failed 404
So i made sure that the demo worked here
And then I added my specific action jobs to the called action
It looks like the sleep commands solved it
steps: - name: Setting Up Integration Tests run: | echo "Wait for NCTL" sleep 10s

@anupkumardh
Copy link

Had the same issue was forgot to add the user to the repo

@littlix
Copy link

littlix commented Nov 29, 2023

For people who are as dumb as I - if you're doing this in a repo you've created in an organisation, the owner is the organisation, not yourself 💀

@radnov
Copy link

radnov commented Dec 6, 2023

I encountered this error today and after a few hours of scratching my head I realised I was setting an environment variable named API_URL in a previous job step, which was picked up by this action here. 🤦

Not that this is a bug, but using such general environment variable names with parameter expansion in public facing scripts is bound to lead to mishaps like this.

@brianjmurrell
Copy link

does anyone know which specific permissions are needed by the PAT? Is it possible to grant these permissions to the OOTB GITHUB_TOKEN?

Did you find an answer to either (or both!) of these questions? The README is light (read: absent) of any details about the scopes needed on the PAT.

@danopia
Copy link

danopia commented Dec 2, 2024

I'm looking into the fine-grained permissions for this action.. The APIs that I see used with the github_token input, and their permissions, are:

  • repos/${INPUT_OWNER}/${INPUT_REPO}/actions/workflows/${INPUT_WORKFLOW_FILE_NAME}/runs
    • Needs "Actions" repository permissions (read)
  • repos/${INPUT_OWNER}/${INPUT_REPO}/actions/workflows/${INPUT_WORKFLOW_FILE_NAME}/dispatches
    • Needs "Actions" repository permissions (write)
  • repos/${INPUT_OWNER}/${INPUT_REPO}/actions/runs/$last_workflow_id
    • Needs "Actions" repository permissions (read)

In summary it looks like "Actions: Read and write" should be sufficient. I'll be validating this.

As far as the OOTB GITHUB_TOKEN, I understand that it is not possible to use because anything done using the Github Actions GITHUB_TOKEN is blocked from triggering further Github Actions.

@brianjmurrell
Copy link

Any relationship to #96 here?

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