deployctl complains about corrupted credentials file in Windows
$ deno --version
deno 2.1.3 (stable, release, x86_64-pc-windows-msvc)
v8 13.0.245.12-rusty
typescript 5.6.2
$ deno eval 'console.log(Deno.build)'
{
target: "x86_64-pc-windows-msvc",
arch: "x86_64",
os: "windows",
vendor: "pc",
env: "msvc"
}
$ deployctl deployments show
ℹ Using config file 'C:\Users\[redacted]\[project-name]\deno.json'
⚠ Failed to get token from credentials file. Will provision a new token for this execution but please make sure to fix the issue afterwards.
✖ The credentials file has been tampered with and will be ignored. Please delete it.
ℹ Provisioning a new access token...
ℹ Authorization URL: https://dash.deno.com/signin/cli?claim_challenge=[redacted]
⠴ Waiting for authorization...
(Nearly?) all actions with deployctl will continuously open the browser to request for a new token.
Checking through the source code, I believe it is because deployctl checks for the permission of the ~/.deno/deployctl/credentials.json file.
https://github.com/denoland/deployctl/blob/873e36ef145b98c8762b777e2b1532e4096f4f94/src/utils/token_storage/fs.ts#L3-L10
This wouldn't really work on Windows, since it does not support Unix style permission flags.
As a recommendation, perhaps we could completely ignore the permission check, if the OS is Windows?
I have the same issue.
This is extremely annoying and opinionated? Why are you checking the permissions of the file. Also, if you're going to check them, at least do it in an os agnostic way.
Happening to me too on Windows 11
can we get a config/flag to disable this or do we need to manually rip out parts of the code ourselves?
Workaround: use --token or set the DENO_DEPLOY_TOKEN env var