npx wranger token permission for automated deployment
Hello everyone,
I'm trying to deploy a Cloudflare Pages site using a Bitbucket pipeline. I've set everything up (CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN) and am running the following command:
However, I'm encountering an issue with token permissions. I'm using a token with the "Edit Cloudflare Workers" template, but it doesn't seem to have sufficient permissions for the deployment. I haven't been able to find more information on the required permissions for this process.
Has anyone experienced this issue or knows what specific permissions I should be using? Any help would be greatly appreciated!
10 Replies
Here is the current token permission
Has anyone has some example permissions that works?
It seems to be a bug rather than mis config?
This isn't a perm issue
Your account ID isn't being replaced you can see the URL is $$$$CLOUDFLARE_ACCOUNT_ID
You gotta fix your variable
Hello,
Sorry, I missed your message, It's been picked up but was censored by Bitbucket pipeline
As I was able to run whomai without problem.
whoami doesn't use the account ID, it isn't showing $$$$CLOUDFLARE... there
So are you sure it is?
The only way to get the error you're getting is if the URL is wrong due to either incorrect path or incorrect values passed in
Could it be that CLOUDFLARE_ACCOUNT_ID is a reserved word?
Take a look at the picture, it's behaviour is very strange
Weird behaviour. I'd maybe ask whoever your CI provider is what's happening
Found the problem. Once I saw that Bitbucket censored using single $, it clicked to me that the many $$$$$ just the way they want to indicate that your env does indeed has $ in it.
My problem was that I set CLOUDFLARE_ACCOUNT_ID=$CLOUDFLARE_ACCOUNT_ID
literally
.
It's my mistake, sorry, to bother you.
And thanks for pointing out, I really does point me into the correct direction.Ah haha that'll do it