[cmake-developers] [CMake 0014141]: file(UPLOAD ....) fails with scp protocol using keys
Mantis Bug Tracker
mantis at public.kitware.com
Tue May 14 20:12:51 EDT 2013
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=14141
======================================================================
Reported By: Craig Scott
Assigned To:
======================================================================
Project: CMake
Issue ID: 14141
Category: CMake
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2013-05-14 20:12 EDT
Last Modified: 2013-05-14 20:12 EDT
======================================================================
Summary: file(UPLOAD ....) fails with scp protocol using keys
Description:
When using the file(UPLOAD .....) command with a destination url which specifies
the scp protocol, it fails with an ambiguous error message. I've attached a
small example script which triggers the problem for me every time, but the
important line is one like this:
file(UPLOAD someFileToUpload.txt
scp://myusername@somehost.somedomain/~/
TIMEOUT 5
INACTIVITY_TIMEOUT 10
STATUS uploadResult
LOG uploadLog
SHOW_PROGRESS
)
An example of the output follows:
About to connect() to somehost.somedomain port 22
(http://public.kitware.com/Bug/view.php?id=0)
Trying 192.168.1.3... connected
Connected to somehost.somedomain (192.168.1.3) port 22
(http://public.kitware.com/Bug/view.php?id=0)
SSH authentication methods available: publickey
Using ssh public key file /home/myusername/.ssh/id_dsa.pub
Using ssh private key file /home/myusername/.ssh/id_dsa
Initialized SSH public key authentication
Authentication complete
SSH CONNECT phase done
failed waiting for ACK
Connection http://public.kitware.com/Bug/view.php?id=0 to host
somehost.somedomain left intact
Error in the SSH layer
Closing connection http://public.kitware.com/Bug/view.php?id=0
The "failed waiting for ACK" error is pretty non-specific. A quick bit of
googling suggests that this is a fairly generic error which could have various
causes, but since no further information is provided and there's nothing in the
logs on the server after authentication succeeds, I can't get any more info on
what the underlying problem is. I've tried various combinations of host names
and target directory paths, but always the same problem. Removing the username
part from the url leads to authentication failure (as you'd expect). Using the
sftp:// protocol fails as well, with the "failed waiting for ACK" message
replaced with:
Upload failed: Operation failed (4/-31)
If you try the exact same scp operation using curl at the command line, it
succeeds. CMake is using libcurl under the covers and when I built cmake, I told
it to use the system-supplied libcurl. This suggests that CMake is doing
something wrong with how it is passing information to libcurl since the same
operation when performed at the command line with curl directly works fine.
Steps to Reproduce:
1. Ensure private/public keys are set up and working (test with ssh at a command
line).
2. Process the attached file with cmake using a command like the following:
cmake -P uploadFails.cmake
NOTE: You could also embed similar commands in a real CMakeLists.txt file, but
you get similar results.
3. Confirm that the equivalent operation can be performed successfully using
curl at the command line. Eg:
curl -v -T uploadFails.cmake scp://myusername@somehost.somedomain/~/
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2013-05-14 20:12 Craig Scott New Issue
2013-05-14 20:12 Craig Scott File Added: uploadFails.cmake
======================================================================
More information about the cmake-developers
mailing list