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

@lucacerone lucacerone commented May 12, 2015

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

This comment has been minimized.

Copy link
Member

@stewid 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

This comment has been minimized.

Copy link
Author

@lucacerone lucacerone commented May 12, 2015

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

This comment has been minimized.

Copy link
Member

@stewid stewid commented May 13, 2015

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

@stewid stewid closed this 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

This comment has been minimized.

Copy link

@paulrougieux paulrougieux commented Jul 10, 2017

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

This comment has been minimized.

Copy link

@AmeliaMN AmeliaMN commented Jan 19, 2019

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

This comment has been minimized.

Copy link

@AmeliaMN AmeliaMN commented Jan 19, 2019

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.