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

Included curl doesn't support SCP/SFTP anymore since libssh2 not used in compilation. #2491

Closed
fxmauricard opened this issue Jan 24, 2020 · 9 comments
Milestone

Comments

@fxmauricard
Copy link

fxmauricard commented Jan 24, 2020

Up to Git for Windows 2.16.1.2, the included curl binaries worked with scp/sftp protocols.

Since the Git for Windows 2.16.1.2 version, the support is broken.
I've investigated and it seems cURL was upgraded from 7.57 to 7.58.

By checking at commit in the cURL repository, it seems it could be the introduction of the libssh support for the scp/sftp backend that could change the compilation behavior for those who wanted to use libssh2.

See that commit : curl/curl@c92d2e1

As I'm not aware of how the Git for Windows package is made, I cannot check how the compilation flag for cURL are managed.

But we can find cURL binaries of the web that continue to use libssh2 after the 7.57 version.

@fxmauricard fxmauricard changed the title Included curl doesn't support SCP/SFTP anymore since libssl2 not used in compilation. Included curl doesn't support SCP/SFTP anymore since libssh2 not used in compilation. Jan 24, 2020
@fxmauricard
Copy link
Author

As I've tested :

  • official curl binaries for Windows have libssh2 support enabled.
  • official MSYS binaries have libssh2 support enabled.

I've oppened an issue at the curl team here : curl/curl#4848

@dscho
Copy link
Member

dscho commented Jan 24, 2020

Up to Git for Windows 2.16.1.2, the included curl binaries worked with scp/sftp protocols.

Since the Git for Windows 2.16.1.2 version, the support is broken.

As Git does not require this support, that is well within the range of the expected.

As I'm not aware of how the Git for Windows package is made, I cannot check how the compilation flag for cURL are managed.

There are several things at play: which curl.exe are you using? The /mingw64/bin/curl.exe one ("MINGW") or the /usr/bin/curl.exe one ("MSYS")? Find out via which curl.exe in your Git Bash.

As this is not a Git-specific issue (and Git for Windows does not promise you to provide all the things you want, including fries), it might be an intentional change.

Having said that, users who contribute their time and their effort are always welcome to ask for slightly more than users who don't. So maybe the Git for Windows project can accommodate what you want, it's just not yet clear how much effort/payload that requires.

@fxmauricard
Copy link
Author

The Git Bash one is /mingw64/bin/curl.exe.

I discovered that problem using git-ftp for deploying a web app on a remote server using an SFTP link.
On MacOS/Linux it's working, but on our Windows desktop not.

I really think the issue was done by a change in the curl repository. But neither the binaries provides by the curl team nor the MSYS2 one seems impacted.

I'm currently digging in repos to see how is retrieved and packaged the curl binary provided in Git for Windows and why it's not compiled with libssh2.

@dscho
Copy link
Member

dscho commented Jan 24, 2020

I discovered that problem using git-ftp for deploying a web app on a remote server using an SFTP link.
On MacOS/Linux it's working, but on our Windows desktop not.

git ftp is not an officially-supported command. Is this an alias on your side?

@fxmauricard
Copy link
Author

It's an OSS projet ( https://github.com/git-ftp/git-ftp ).

@dscho
Copy link
Member

dscho commented Jan 24, 2020

@fxmauricard since we ship /mingw64/bin/libssh2-1.dll anyway (it is still listed as a dependency of libcurl), I see no reason why I should reject a PR from you to re-add support for SCP/SFTP in the libcurl shipped with Git for Windows.

Most likely, you'll just want to add --with-libssh2 here.

Of course you will want to test this first by

  • installing the Git for Windows SDK,
  • sdk cd mingw-w64-curl
  • editing the PKGBUILD file
  • building the package via sdk build
  • installing the patched curl into the SDK via pacman -U mingw-w64-x86_64-curl*.pkg.tar.xz
  • test, test, test

Once that works, commit, open a PR, and I'll merge it, then rebuild the official package.

@dscho
Copy link
Member

dscho commented Jan 31, 2020

Could you verify that the latest snapshot fixes the issue?

@dscho dscho added this to the Next release milestone Jan 31, 2020
@fxmauricard
Copy link
Author

I've tested the laster snapshot, and it works properly now!

@dscho
Copy link
Member

dscho commented Jan 31, 2020

Excellent!

@dscho dscho closed this as completed Jan 31, 2020
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

2 participants