I am trying to use DVC with a remote set to a NAS. So I did
dvc remote add -d myremote1 https://mynas.url.something.es:3444/thefolder/dvcstore1/
but after this I cannot push.
I tried
dvc remote modify --local myremote1 user justme
dvc remote modify --local myremote1 password mysupersecretpassword
but after this
dvc push
Collecting |0.00 [00:00, ?entry/s]
ERROR: failed to transfer '22a1a2931c8370d3aeedd7183606fd7f' - 401, message='Unauthorized', url=URL(https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5/22/a1a2931c8370d3aeedd7183606fd7f')
Pushing
ERROR: failed to push data to the cloud - 1 files failed to upload
I also tried
dvc remote modify myremote1 auth basic
and later I erased my password and set
dvc remote modify myremote1 ask_password true
with this I got
dvc push
Enter a password for host 'None' user 'justme':
Collecting |0.00 [00:00, ?entry/s]
ERROR: failed to transfer '22a1a2931c8370d3aeedd7183606fd7f' - https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5/22/a1a2931c8370d3aeedd7183606fd7f
Pushing
ERROR: failed to push data to the cloud - 1 files failed to upload
Something that calls my attention: Why does it say "Enter a password for host 'None'???
Host None?
What can I do to succesfuly setup a remote and push data to it?
EDIT:
DVC version: 3.39.0
dvc push -v
2024-01-17 13:58:53,722 DEBUG: v3.39.0 (pip), CPython 3.9.16 on Linux-5.15.0-91-generic-x86_64-with-glibc2.31
2024-01-17 13:58:53,722 DEBUG: command: /home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/bin/dvc push -v
Enter a password for host 'None' user 'justme':
Collecting |0.00 [00:00, ?entry/s]
2024-01-17 13:59:05,556 DEBUG: Preparing to transfer data from '/path/to/example1/.dvc/cache/files/md5' to 'https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5'
2024-01-17 13:59:05,556 DEBUG: Preparing to collect status from 'https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5'
2024-01-17 13:59:05,557 DEBUG: Collecting status from 'https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5'
2024-01-17 13:59:05,559 DEBUG: Querying 1 oids via object_exists
2024-01-17 13:59:05,621 DEBUG: Preparing to collect status from '/path/to/example1/.dvc/cache/files/md5'
2024-01-17 13:59:05,621 DEBUG: Collecting status from '/path/to/example1/.dvc/cache/files/md5'
2024-01-17 13:59:05,776 ERROR: failed to transfer '22a1a2931c8370d3aeedd7183606fd7f' - https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5/22/a1a2931c8370d3aeedd7183606fd7f
Traceback (most recent call last):
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 330, in transfer
_try_links(
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 262, in _try_links
return copy(
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 87, in copy
return _put(
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 156, in _put
return _put_one(from_paths[0], to_paths[0])
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/generic.py", line 148, in _put_one
return put_file(from_path, to_path, callback=callback, **put_file_kwargs)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/callbacks.py", line 146, in sync_wrapper
res = fn(*args, **kwargs)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/callbacks.py", line 164, in sync_wrapper
return fn(path1, path2, **kwargs)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_objects/fs/base.py", line 643, in put_file
self.fs.put_file(os.fspath(from_file), to_info, callback=callback, **kwargs)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/fsspec/asyn.py", line 118, in wrapper
return sync(self.loop, func, *args, **kwargs)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/fsspec/asyn.py", line 103, in sync
raise return_result
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/fsspec/asyn.py", line 56, in _runner
result[0] = await coro
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc_http/spec.py", line 11, in _put_file
return await super()._put_file(*args, **kwargs)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/fsspec/implementations/http.py", line 311, in _put_file
self._raise_not_found_for_status(resp, rpath)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/fsspec/implementations/http.py", line 216, in _raise_not_found_for_status
raise FileNotFoundError(url)
FileNotFoundError: https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5/22/a1a2931c8370d3aeedd7183606fd7f
Pushing
2024-01-17 13:59:05,780 ERROR: failed to push data to the cloud - 1 files failed to upload
Traceback (most recent call last):
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc/commands/data_sync.py", line 64, in run
processed_files_count = self.repo.push(
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc/repo/__init__.py", line 65, in wrapper
return f(repo, *args, **kwargs)
File "/home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/lib/python3.9/site-packages/dvc/repo/push.py", line 171, in push
raise UploadError(failed_count)
dvc.exceptions.UploadError: 1 files failed to upload
2024-01-17 13:59:05,783 DEBUG: Analytics is enabled.
2024-01-17 13:59:05,838 DEBUG: Trying to spawn ['daemon', 'analytics', '/tmp/tmp32qevoi2', '-v']
2024-01-17 13:59:05,844 DEBUG: Spawned ['daemon', 'analytics', '/tmp/tmp32qevoi2', '-v'] with pid 3223147
EDIT2: An even stranger thing happened!: I could push!
But no contents were pushed.
I deleted manually the port from the remote address
(so now it is https://mynas.url.something.es:3444/thefolder/dvcstore1/)
and I did
>dvc push -v
2024-01-23 19:08:22,593 DEBUG: v3.39.0 (pip), CPython 3.9.16 on Linux-5.15.0-91-generic-x86_64-with-glibc2.31
2024-01-23 19:08:22,593 DEBUG: command: /home/justme/.cache/pypoetry/virtualenvs/example1-ui6lFrCK-py3.9/bin/dvc push -v
Enter a password for host 'None' user 'justme':
Collecting |0.00 [00:00, ?entry/s]
2024-01-23 19:08:34,697 DEBUG: Preparing to transfer data from
/path/to/example1/.dvc/cache/files/md5' to 'https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5'
2024-01-23 19:08:34,697 DEBUG: Preparing to collect status from 'https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5'
2024-01-23 19:08:34,697 DEBUG: Collecting status from 'https://mynas.url.something.es:3444/thefolder/dvcstore1/files/md5'
2024-01-23 19:08:34,699 DEBUG: Querying 1 oids via object_exists
Pushing
Everything is up to date.
2024-01-23 19:08:35,188 DEBUG: Analytics is enabled.
2024-01-23 19:08:35,264 DEBUG: Trying to spawn ['daemon', 'analytics', '/tmp/tmp82uf158p', '-v']
2024-01-23 19:08:35,270 DEBUG: Spawned ['daemon', 'analytics', '/tmp/tmp82uf158p', '-v'] with pid 2311402
However nothing is in the remote address
It is typical to mount the NAS and then push to that mounted drive (see https://dvc.org/doc/user-guide/data-management/remote-storage#file-systems-local-remotes). It's not common to transfer via http, so you may want to try mounting the NAS first unless you are sure that your NAS supports transferring directly over http and you have a strong reason to prefer this method.