denoland / deployctl

Command line tool for Deno Deploy
https://deno.com/deploy
MIT License
352 stars 58 forks source link

`deployctl deploy` with `--org` parameter fails with Access Denied when using an org-scoped token #305

Open NReilingh opened 7 months ago

NReilingh commented 7 months ago

When using an org-scoped deploy token, the --org parameter is superfluous since the org token will only have access to its one org. However, providing this parameter with the org name matching the token currently results in error: Access Denied. I have only tested this with an org name that has spaces.

Repro:

Expected outcome:

Command proceeds as the token has access to the specified org.

Actual outcome:

Command fails with Access Denied when fetching org details:

% mkdir -p /tmp/wat; cd /tmp/wat
% deno init
% deployctl deploy --org="My Org Name"
i Using config file '/private/tmp/wat/deno.json'
‼ No project name or ID provided with either the --project arg or a config file.
⠸ You have specified the organization My Org Name. Fetching details...
error: Access Denied