question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

get: fails to clone with ssh

See original GitHub issue

Bug Report

Issue name

get: “Failed to clone repo” when attempting to clone via ssh.

Description

dvc get fails to clone git repository via ssh in general. git clone works.

Reproduce

Reproduction requires a git repository and a configured ssh key for git. In the example, the .dvc files are located in a data branch.

% dvc get --rev v0.0.1 -o data/my-dvc-proj git@XXXprivate-gitlab.com:XXXXX/my-dvc-proj.git data
ERROR: failed to get 'data' from 'git@XXXprivate-gitlab.com:XXXXX/my-dvc-proj.git' - Failed to clone repo 'git@XXXprivate-gitlab.com:XXXXX/my-dvc-proj.git' to '/var/folders/r7/6vs0hrvd2gl7z35_lm1vr5g00000gn/T/tmpkvxn3v7vdvc-clone'

git clone works as expected

% git clone -b data git@XXXprivate-gitlab.com:XXXXX/my-dvc-proj.git
Cloning into 'my-dvc-proj'...
remote: Enumerating objects: 138, done.
remote: Counting objects: 100% (138/138), done.
remote: Compressing objects: 100% (86/86), done.
remote: Total 138 (delta 60), reused 112 (delta 36), pack-reused 0
Receiving objects: 100% (138/138), 585.58 KiB | 5.86 MiB/s, done.
Resolving deltas: 100% (60/60), done.

Expected

Cloning should work.

Environment information

Output of dvc doctor:

DVC version: 2.37.0 (pip)
---------------------------------
Platform: Python 3.8.12 on macOS-12.6.1-x86_64-i386-64bit
Subprojects:
	dvc_data = 0.28.4
	dvc_objects = 0.14.0
	dvc_render = 0.0.15
	dvc_task = 0.1.6
	dvclive = 1.0.1
	scmrepo = 0.1.4
Supports:
	http (aiohttp = 3.8.3, aiohttp-retry = 2.8.3),
	https (aiohttp = 3.8.3, aiohttp-retry = 2.8.3)

Additional Information (if any):

Opened separate issue as proposed in #7670.

Issue Analytics

  • State:open
  • Created 9 months ago
  • Reactions:13
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
dtrifirocommented, Dec 20, 2022

This has been solved upstream. Waiting for an asyncssh release (see https://github.com/ronf/asyncssh/issues/528)

2reactions
dekrompcommented, Dec 13, 2022

Yes I have. But since the XXXprivate-gitlab.com is within the private network it is set to none:

Host *XXXprivate-gitlab.com
   ProxyCommand none

For all other ips I am using corkscrew for tunneling through the proxy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git clone fails when cloning via SSH
Git clones fail when using ssh even if an Access key has been added to the repository or an SSH key has been...
Read more >
ssh clone not working with github
git clone git://github.com/npsabari/testrepo.git. And then I tried ssh git@github.com , but I got the error: "Permission denied (publickey)." ...
Read more >
How to Fix SSH “Permission Denied” with Git Clone
Solution 1: Use HTTPS ... This is the most effortless solution at hand. Simply switch to cloning from the HTTPS path for your...
Read more >
git clone fails using ssh - Visual Studio Feedback
I tried to git clone a new Azure DevOps project created via wizard started from the Azure Portal. I get this error: Access...
Read more >
Troubleshooting cloning errors
Error : Repository not found · Check your spelling · Checking your permissions · Check your SSH access · Check that the repository...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found