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

git2r::clone does not recognize SSH addresses in R 3.2.0 #140

Closed
lucacerone opened this issue May 12, 2015 · 6 comments
Closed

git2r::clone does not recognize SSH addresses in R 3.2.0 #140

lucacerone opened this issue May 12, 2015 · 6 comments

Comments

@lucacerone
Copy link

Hi, I have git2r ‘0.10.1’ installed (it comes out with the new devtools 1.8.0) on a Linux machine.

In R 3.2.0 the function/method git2r::clone does not recognize ssh addresses.

The command:

clone("git@remotehost:/path/to/repository.git", "destdir")

fails with error:

cloning into 'destdir'...
Error in git2r::clone("git@remotehost:/path/to/repository.git", "destdir") : 
Error in 'git2r_clone': Unsupported URL protocol

This doesn't happen in R 3.1.3 (but I might have a different version of git2r there, I can look at it tonight when I am home)

@stewid
Copy link
Member

stewid commented May 12, 2015

You have to install LibSSH2 before building git2r

library(git2r)
libgit2_features()
#> $threads
#> [1] FALSE
#> 
#> $https
#> [1] TRUE
#> 
#> $ssh
#> [1] TRUE

@lucacerone
Copy link
Author

Thanks Stefan! I managed to install it in my linux machine but have no idea
how to do that in Windows.

Can you point me to some resource?

Thanks a lot for your help!
On May 12, 2015 10:27 PM, "Stefan Widgren" notifications@github.com wrote:

You have to install LibSSH2 before building git2r

library(git2r)
libgit2_features()

#> $threads
#> [1] FALSE
#>
#> $https
#> [1] TRUE
#>
#> $ssh
#> [1] TRUE


Reply to this email directly or view it on GitHub
#140 (comment).

@stewid
Copy link
Member

stewid commented May 13, 2015

Sorry, git2r doesn't support ssh on Windows yet.

@stewid stewid closed this as completed May 13, 2015
jdblischak added a commit to jdblischak/open-sci-template that referenced this issue Jan 5, 2016
Because of libssh2 issues with git2r:
ropensci/git2r#140
@paulrougieux
Copy link

See also this StackOverflow question: devtools::install_git Over SSH

After you've installed LibSSH2 you'll need to reinstall the git2r package to enable SSH transport (since it's enabled/disabled during the package build).

@AmeliaMN
Copy link

The mac CRAN build of git2r doesn't have this enabled, but you can get it working if you do install.packages("git2r", type = "source")

@AmeliaMN
Copy link

Also make sure you're being intentional about protocol = "ssh" (the default) versus protocol = "https". I usually use https, so that was part of my problem.

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

No branches or pull requests

4 participants