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

Problem with SSH on Windows #327

Closed
ijlyttle opened this issue Feb 24, 2018 · 10 comments
Closed

Problem with SSH on Windows #327

ijlyttle opened this issue Feb 24, 2018 · 10 comments

Comments

@ijlyttle
Copy link
Contributor

@ijlyttle ijlyttle commented Feb 24, 2018

Hi,

A colleague and I noticed this behavior on Windows, using the CRAN version of git2r:

> push(repo, credentials = cred_ssh_key())
Error in .local(object, ...) : 
  Error in 'git2r_push': failed to start SSH session: Unable to exchange encryption keys

This used to work for me, but now it does not.

My colleague pointed out this recent notice from GitHub:

https://github.com/blog/2507-weak-cryptographic-standards-removed

We also came across people having a similar problem in git-up/GitUp#241

The commonality between the two seems to be the use of libssh2. I'm afraid that this is as far as we have been able to dig.

It looks like you may be addressing this already in #325 - if this is the case, please accept my apologies and close this issue.

I can be of help to test solutions, but I don't think I have the skills to implement a solution.

Thanks!

@stewid
Copy link
Member

@stewid stewid commented Feb 24, 2018

@ijlyttle Thanks for reporting this.

@jeroen I think an updated version of libssh2 is needed to fix this, could you please update to 1.8 on https://github.com/rwinlib/libssh2

@jeroen jeroen closed this as completed in ca4d230 Feb 25, 2018
jeroen added a commit that referenced this issue Feb 25, 2018
Update libssh2 on Windows and cleanup build. Fixes #327
@jeroen
Copy link
Member

@jeroen jeroen commented Feb 25, 2018

OK. @ijlyttle can you try the dev version? Make sure git2r is not loaded in R while you upgrade it:

devtools::install_github("ropensci/git2r")

@ijlyttle
Copy link
Contributor Author

@ijlyttle ijlyttle commented Feb 25, 2018

I have tested the dev version on MacOS and Windows - Mac seems to be OK.

However, on Windows:

> library("git2r")
> repo <- repository(".")
> push(repo, credentials = cred_ssh_key())
Error in head.git_repository(object) : 
  Error in 'git2r_repository_head': Invalid repository

I don't even get to the point where I am asked for my ssh passphrase, so I suspect there is something else going on here.

@jeroen
Copy link
Member

@jeroen jeroen commented Feb 25, 2018

Was this issue caused by the upgrade of libgit2, or was it maybe not working before either?

@ijlyttle
Copy link
Contributor Author

@ijlyttle ijlyttle commented Feb 25, 2018

I suspect it was not working before.

@jeroen
Copy link
Member

@jeroen jeroen commented Feb 25, 2018

Could you open a new issue for this to make sure these problems do not get mixed up?

@stewid
Copy link
Member

@stewid stewid commented Feb 25, 2018

Thanks @jeroen

I'm currently changing from S4 classes to S3 in the 'master' branch and I'm not ready to submit it to CRAN yet. I have therefore cherry-picked the fix to the S4-classes branch. @ijlyttle could you please check that branch instead.

Unfortunatly, I get the following error on winbuilder

"D:/RCompile/recent/R/bin/i386/Rscript.exe" --vanilla "../tools/winlibs.R" 1.8.0
Error in download.file(sprintf("https://github.com/rwinlib/libssh2/archive/v%s.zip",  : 
  cannot open URL 'https://github.com/rwinlib/libssh2/archive/v1.8.0.zip'
In addition: Warning message:
In download.file(sprintf("https://github.com/rwinlib/libssh2/archive/v%s.zip",  :
  InternetOpenUrl failed: 'Die Serververbindung konnte nicht hergestellt werden.'
  Execution halted

which I think is also caused by the recent change on GitHub. @jeroen do you think that is the reason?

@jeroen
Copy link
Member

@jeroen jeroen commented Feb 25, 2018

Yes it's because of https://twitter.com/opencpu/status/966785019560775685

Hopefully winbuilder will be updated soon.

@ijlyttle
Copy link
Contributor Author

@ijlyttle ijlyttle commented Feb 25, 2018

@stewid, using the S4-classes branch (e7f28e3), I am still getting this on Windows 10:

> library("git2r")
> repo <- repository(".")
> push(repo, credentials = cred_ssh_key())
Error in .local(object, ...) : 
  Error in 'git2r_push': failed to start SSH session: Unable to exchange encryption keys

@jeroen
Copy link
Member

@jeroen jeroen commented Mar 1, 2018

FYI the win builder is fixed now.

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

3 participants