You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI: --no-repo still initializes default virtual repo #4316
In dstack CLI 0.22.0/0.22.1, dstack apply --no-repo still initializes the default virtual repository and calls POST /api/project/{project}/repos/init.
Reproduction
Run a repo-free task with dstack apply -f task.yml --no-repo -y. The CLI still calls /repos/init; on a project where the caller cannot initialize repositories, apply fails with 403.
Cause
In src/dstack/_internal/cli/services/configurators/run.py, get_repo() returns None when configurator_args.no_repo is set, but get_plan() unconditionally creates the default virtual repo:
@sachintandon We look into this and it seems the problem is not with /repos/init at all. The real problem is that you dstack CLI is either using an invalid dstack token or a valid dstack token is used with a project where the user is not a member.
The /repos/init API is failed only because it's invoked before other APIs are called. Even if this API is not called, another API, e.g. runs/get_plan would fail with the same 403 error.
The situation is simply that any dstack command will fail, including dstack ps, dstack offer, dstack fleet, etc.
For example, if you configure your dstack token via dstack project add (in ~/.dstack/config.yml), and you call dstack project -v, you'll see something like this:
Means the specified dstack token doesn't give you the access to the specified project.
You can also check it via dstack UI:
Open dstack UI, go to your user Settings and check Token. If you're using a wrong token in CLI, re-configure the CLI with dstack project add.
Then open the specified project Settings, and check that your user is listed as a member of that project. If not, ask the project admin, to add your user.
Activity
peterschmidt85 commentedon Sep 25, 2026
cc @un-def
sachintandon commentedon Oct 6, 2026
@un-def / @peterschmidt85 any update on it ?
peterschmidt85 commentedon Oct 7, 2026
@sachintandon We look into this and it seems the problem is not with
/repos/initat all. The real problem is that youdstackCLI is either using an invaliddstacktoken or a validdstacktoken is used with a project where the user is not a member.The
/repos/initAPI is failed only because it's invoked before other APIs are called. Even if this API is not called, another API, e.g.runs/get_planwould fail with the same 403 error.The situation is simply that any
dstackcommand will fail, includingdstack ps,dstack offer,dstack fleet, etc.For example, if you configure your
dstacktoken viadstack project add(in~/.dstack/config.yml), and you calldstack project -v, you'll see something like this:Means the specified
dstacktoken doesn't give you the access to the specified project.You can also check it via
dstackUI:dstackUI, go to your userSettingsand checkToken. If you're using a wrong token in CLI, re-configure the CLI withdstack project add.