Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

studio login/logout break after moving config to local config #10679

Open
f-fuchs opened this issue Jan 29, 2025 · 5 comments
Open

studio login/logout break after moving config to local config #10679

f-fuchs opened this issue Jan 29, 2025 · 5 comments
Labels
triage Needs to be triaged

Comments

@f-fuchs
Copy link

f-fuchs commented Jan 29, 2025

Hey,

after I moved following from the .config/dvc/config file to the local config.local file in my repository the commands studio login and logout seem to be broken.

[studio]
    url = https://studio.dvc.ai
    token = SECRET

dvc login tellsthat I have to logout first, but logout tells me that I am not logged in.

(foundation-models) [fuchsfa@cerberus04:foundation-models]$ dvc studio login --verbose
2025-01-29 11:07:57,833 DEBUG: v3.58.0 (pip), CPython 3.12.7 on Linux-5.15.0-119-generic-x86_64-with-glibc2.36
2025-01-29 11:07:57,833 DEBUG: command: /home/fuchsfa/foundation-models/.venv/bin/dvc studio login --verbose
2025-01-29 11:07:59,458 ERROR: Token already exists. To login with a different token, logout using 'dvc studio logout'.
Traceback (most recent call last):
  File "/home/fuchsfa/.local/share/uv/python/cpython-3.12.7-linux-x86_64-gnu/lib/python3.12/site-packages/dvc/cli/__init__.py", line 211, in main
    ret = cmd.do_run()
          ^^^^^^^^^^^^
  File "/home/fuchsfa/.local/share/uv/python/cpython-3.12.7-linux-x86_64-gnu/lib/python3.12/site-packages/dvc/cli/command.py", line 41, in do_run
    return self.run()
           ^^^^^^^^^^
  File "/home/fuchsfa/.local/share/uv/python/cpython-3.12.7-linux-x86_64-gnu/lib/python3.12/site-packages/dvc/commands/studio.py", line 32, in run
    raise DvcException(
dvc.exceptions.DvcException: Token already exists. To login with a different token, logout using 'dvc studio logout'.

2025-01-29 11:07:59,501 DEBUG: Analytics is enabled.
2025-01-29 11:07:59,948 DEBUG: Trying to spawn ['daemon', 'analytics', '/tmp/tmpsri7ayds', '-v']
2025-01-29 11:07:59,964 DEBUG: Spawned ['daemon', 'analytics', '/tmp/tmpsri7ayds', '-v'] with pid 2396
(foundation-models) [fuchsfa@cerberus04:foundation-models]$ dvc studio logout --verbose
2025-01-29 11:08:11,955 DEBUG: v3.58.0 (pip), CPython 3.12.7 on Linux-5.15.0-119-generic-x86_64-with-glibc2.36
2025-01-29 11:08:11,955 DEBUG: command: /home/fuchsfa/foundation-models/.venv/bin/dvc studio logout --verbose
Not logged in to Studio. Log in with 'dvc studio login'.
2025-01-29 11:08:13,433 DEBUG: Writing '/home/fuchsfa/.config/dvc/config'.
2025-01-29 11:08:13,455 DEBUG: Analytics is enabled.
2025-01-29 11:08:13,741 DEBUG: Trying to spawn ['daemon', 'analytics', '/tmp/tmpzktwhuai', '-v']
2025-01-29 11:08:13,753 DEBUG: Spawned ['daemon', 'analytics', '/tmp/tmpzktwhuai', '-v'] with pid 2475

The logging to studio works though, I just have to manually change the token now 👍

@shcheklein shcheklein added the triage Needs to be triaged label Jan 30, 2025
@shcheklein
Copy link
Member

did you keep / do you have the same studio config still in the global config?

@f-fuchs
Copy link
Author

f-fuchs commented Jan 30, 2025

no I removed the global config, because I only wanted specific repositories to connect to studio.

@shcheklein
Copy link
Member

could you run dvc config --list --show-origin please?

@f-fuchs
Copy link
Author

f-fuchs commented Feb 4, 2025

(foundation-models) [fuchsfa@makaria09:foundation-models]$ dvc config --list --show-origin
.dvc/config     remote.local_remote.url=/home/fuchsfa/foundation-models/remote
.dvc/config     core.autostage=true
.dvc/config     core.remote=local_remote
.dvc/config.local       remote.local_remote.url=/home/fuchsfa/foundation-models/remote
.dvc/config.local       exp.auto_push=True
.dvc/config.local       studio.url=https://studio.dvc.ai
.dvc/config.local       studio.token=TOKEN

@shcheklein
Copy link
Member

@amritghimire does logout only affect global config? I think I saw the same behavior in datachain and it was confusing. Can you take a look please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs to be triaged
Projects
None yet
Development

No branches or pull requests

2 participants