Skip to content

Hosting DVC repositories on Gitea? #3287

@gcoter

Description

@gcoter

Hello,

I recently installed Gitea on my personal server. I find it great to manage my git repositories but I was wondering if there was a way to host my DVC repositories as well. My idea is that, since Gitea allows cloning git repositories with SSH, I should be able to clone DVC repositories with SSH as well.

So I tried it with one project. I set a URL for DVC which is as the one for git, but changing the extension from .git to .dvc (ideally, I would like to use this convention). I also created the corresponding directory on the server. If I try to dvc push, I always get this error:

ERROR: unexpected error - EOF during negotiation
------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/sftp_client.py", line 130, in __init__
    server_version = self._send_version()
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/sftp.py", line 134, in _send_version
    t, data = self._read_packet()
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/sftp.py", line 201, in _read_packet
    x = self._read_all(4)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/sftp.py", line 188, in _read_all
    raise EOFError()
EOFError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/main.py", line 49, in main
    ret = cmd.run()
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/command/data_sync.py", line 49, in run
    recursive=self.args.recursive,
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/repo/__init__.py", line 31, in wrapper
    ret = f(repo, *args, **kwargs)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/repo/push.py", line 25, in push
    return self.cloud.push(used, jobs, remote=remote)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/data_cloud.py", line 81, in push
    show_checksums=show_checksums,
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/remote/local.py", line 385, in push
    download=False,
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/remote/local.py", line 358, in _process
    download=download,
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/remote/local.py", line 279, in status
    md5s, jobs=jobs, name=str(remote.path_info)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/remote/ssh/__init__.py", line 329, in cache_exists
    ret = list(itertools.compress(checksums, in_remote))
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 586, in result_iterator
    yield fs.pop().result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/remote/ssh/__init__.py", line 322, in exists_with_progress
    return self.batch_exists(chunks, callback=pbar.update_desc)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/remote/ssh/__init__.py", line 290, in batch_exists
    channels = ssh.open_max_sftp_channels()
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/dvc/remote/ssh/connection.py", line 301, in open_max_sftp_channels
    self._sftp_channels.append(self._ssh.open_sftp())
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/client.py", line 556, in open_sftp
    return self._transport.open_sftp_client()
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/transport.py", line 1097, in open_sftp_client
    return SFTPClient.from_transport(self)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/sftp_client.py", line 170, in from_transport
    return cls(chan)
  File "/home/gcoter/projects/music/unsupervised-source-separation/venv/lib/python3.6/site-packages/paramiko/sftp_client.py", line 132, in __init__
    raise SSHException("EOF during negotiation")
paramiko.ssh_exception.SSHException: EOF during negotiation
------------------------------------------------------------

Of course, I know that Gitea was not developed with DVC in mind, maybe my idea is impossible. But I would like to be sure. Could you give me advice about what I should check on the Gitea server to make sure that DVC can access it through SSH?

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responsewe are waiting for your reply, please respond! :)questionI have a question?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions