Can't publish to Cloudflare pages using API token.
See original GitHub issueHi, The title says about it.
I wanted to deploy my Jekyll website using an automation tool, I created an API token using the Worker template. but it doesnβt seem to work when publishing the page. It works when using wrangler login
Using API token (Edit Cloudflare Worker template):
$ export CLOUDFLARE_API_TOKEN=<insert_api_token_here>
$ wrangler whoami
β
οΈ wrangler 2.0.7
-------------------
Getting User settings...
π You are logged in with an OAuth Token, associated with the email 'lemniskett@gmail.com'!
ββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β Account Name β Account ID β
ββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ€
β Lemniskett@gmail.com's Account β <insert_account_id_here> β
ββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββ
$ wrangler pages publish _site/ --project-name lemniskett
β [ERROR] β [ERROR] Received a bad response from the API
Authentication error [code: 10000]
If you think this is a bug, please open an issue at:
https://github.com/cloudflare/wrangler2/issues/new
Using wrangler login
:
$ wrangler login
β
οΈ wrangler 2.0.7
-------------------
Attempting to login via OAuth...
Successfully logged in.
$ wrangler pages publish _site/ --project-name lemniskett
π Uploading... (23/23)
β¨ Success! Uploaded 23 files (5.51 sec)
β¨ Deployment complete! Take a peek over at https://some.url.here
My wrangler version:
$ wrangler --version
2.0.7
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
REST API Β· Cloudflare Pages docs
After creating your token, you can authenticate and make requests to the API using your API token in the request headers. For example,...
Read more >BUG: Wrangler publish returning generic error: Authentication ...
@threepointone FWIW, I've run into the exact same issue. The problem was a .env file in the current folder containing a CLOUDFLARE_API_TOKENΒ ...
Read more >How to publish a Remix app to the edge with GitLab and ...
To be able to deploy your Cloudflare Worker from a GitLab pipeline you will need an API token. To do so, log in...
Read more >Cloudflare Pages and Workers with Firebase Authentication
If built success, Cloudflare will generate URL for your pages. You can access your pages from this URL. You might need to wait...
Read more >Building Password Purgatory with Cloudflare Pages and ...
Last month as part of my blog post on How Everything We're Told About ... Cloudflare's API tokens page allows you to create...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lemniskett Just add
Account - Cloudflare Pages - Edit
permissionThis is pages, so it may not be related to the routes issue