dvc icon indicating copy to clipboard operation
dvc copied to clipboard

`dvc exp` commands always request my passphrase.

Open lefos99 opened this issue 2 years ago • 4 comments

Bug Report

dvc exp commands always request my passphrase.

Description

Hello, I have the following unwanted behavior. First of all my config looks like this:

[core]
    remote = nas_remote
[cache]
    dir=/fastdata/data/dvc_cache
    type = symlink
[hydra]
    enabled = True
['remote "nas_remote"']
    url = ssh://192.168.93.111:/data/slidespeicher/projects/data/annotations/dvc_setup
    verify = true
    keyfile = /home/deep/.ssh/priv_key.openssh
    user = lefos
    port = 22
    ask_password = false
    ask_passphrase = true

Especially the lines

    ask_password = false
    ask_passphrase = true

are necessary because I connect to my NAS (the remote DVC cache) by using a private key, which works fine by the way. :heavy_check_mark:

I was working with dvc repro and I am changing to dvc exp run and I noticed that whenever I run any dvc exp command (e.g. dvc exp show or dvc exp run), I get the following prompt: Enter a passphrase for host '192.168.93.111' port '22' user 'lefos':. This is normal to be requested when I interact directly with my remote with commands like dvc pull or dvc push, but especially for commands like dvc exp run, it is annoying because it is being requested for each dvc stage.

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.56.0 (pip)
-------------------------
Platform: Python 3.8.13 on Linux-5.4.0-147-generic-x86_64-with-glibc2.17
Subprojects:
        dvc_data = 0.47.5
        dvc_objects = 0.21.2
        dvc_render = 0.4.0
        dvc_task = 0.2.1
        scmrepo = 1.0.3
Supports:
        http (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
        https (aiohttp = 3.8.4, aiohttp-retry = 2.8.3),
        s3 (s3fs = 2023.5.0, boto3 = 1.26.76),
        ssh (sshfs = 2023.4.1)
Config:
        Global: /home/deep/.config/dvc
        System: /etc/xdg/dvc
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/mapper/fastdatagroup-fastdatavolume
Caches: local
Remotes: ssh, s3
Workspace directory: ext4 on /dev/mapper/fastdatagroup-fastdatavolume
Repo: dvc (subdir), git
Repo.site_cache_dir: /var/tmp/dvc/repo/85b2919c00b2eaae667bc92335b08f76

lefos99 avatar Jun 06 '23 08:06 lefos99

Hi @lefos99 , thanks for the report. I am looking into it.

As a current workaround, have you tried setting the following:

dvc remote modify --local nas_remote passphrase mypassphrase

daavoo avatar Jun 06 '23 09:06 daavoo

Do you have any dvc imported data in your pipeline?

daavoo avatar Jun 06 '23 09:06 daavoo

Hi @lefos99 , thanks for the report. I am looking into it.

Thanks @daavoo :smiley_cat:

Do you have any dvc imported data in your pipeline?

No, not at all.

As a current workaround, have you tried setting the following:

dvc remote modify --local nas_remote passphrase mypassphrase

This works, but I don't like that my private password is stored in a file (.dvc/config or .dvc/config.local) 😕

lefos99 avatar Jun 06 '23 10:06 lefos99

@daavoo Were you able to look into this?

dberenbaum avatar Aug 23 '23 12:08 dberenbaum