Hi, I'm following your instructions to setup a git...
# ory-network
s
Hi, I'm following your instructions to setup a github action to update my identity-config like so: https://www.ory.sh/docs/guides/gitops#ory-identities-configuration. But it doesn't work, I'm getting the following error on Github:
Copy code
node:fs:2368
    return binding.writeFileUtf8(
                   ^

Error: EACCES: permission denied, open '/__w/_temp/_runner_file_commands/save_state_3a47ee2c-b0a1-470f-95c0-449f1b687b1b'
    at Object.writeFileSync (node:fs:2368:20)
    at Object.appendFileSync (node:fs:2449:6)
    at Object.issueFileCommand (/__w/_actions/actions/checkout/v4/dist/index.js:3060:8)
    at Object.saveState (/__w/_actions/actions/checkout/v4/dist/index.js:2977:31)
    at 4866 (/__w/_actions/actions/checkout/v4/dist/index.js:2402:10)
    at __nccwpck_require__ (/__w/_actions/actions/checkout/v4/dist/index.js:38194:43)
    at 2565 (/__w/_actions/actions/checkout/v4/dist/index.js:150:34)
    at __nccwpck_require__ (/__w/_actions/actions/checkout/v4/dist/index.js:38194:43)
    at 9210 (/__w/_actions/actions/checkout/v4/dist/index.js:1171:36)
    at __nccwpck_require__ (/__w/_actions/actions/checkout/v4/dist/index.js:38194:43) {
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/__w/_temp/_runner_file_commands/save_state_3a47ee2c-b0a1-470f-95c0-449f1b687b1b'
}

Node.js v20.19.1
Could it have something to do with this comment in your code from 6 months ago: https://github.com/ory/cli/blob/4cb1ec98bc269f5d7c50f32bdc49583179efa9f1/.github/workflows/test-integration.yaml#L20
Because setting
options: --user root
fixes it.
Now the checkout works but it fails when updating the identity-config:
Copy code
Run ory update identity-config --file ory/identity-config-staging.json
  ory update identity-config --file ory/identity-config-staging.json
  shell: sh -e {0}
  env:
    ORY_PROJECT_ID: ***
    ORY_WORKSPACE_ID: ***
    ORY_WORKSPACE_API_KEY: ***
The requested action was forbidden
Error: Process completed with exit code 1.
And it doesn't even provide me with a reason why it failed. Why do you provide these instructions if nothing seems to work or am I missing something? https://www.ory.sh/docs/guides/gitops#ory-identities-configuration Yes, the workspace api key is set correctly.
s
Can you share your whole github action with all steps? It looks like it is rather a setup issue with file system permissions. You can try also to run the commands locally to confirm it is a github specific problem
s
ory update identity-config works on my machine. When running the github action locally with act (https://github.com/nektos/act) i receive the same error. But unfortunately, all the error tells me is "The requested action was forbidden". Is there no way to make it more verbose? Maybe it's a security thing to not share more information on what the problem is? I sent you the github action in a pm, it's exactly the same as you instructed here: https://www.ory.sh/docs/guides/gitops#ory-identities-configuration.
s
I can't find any of the requests on our side that would indicate an error. Can you verify that the local and remote version of the CLI are the same? Is it possible that the keys and IDs don't match?