
Ich möchte diesen Upload auf meinen Server durchführen:
curl -u ****:**** -T - sftp://*****.com:22/apps/jboss-5.1.0/server/fab_server/deploy -v -k
Das Problem ist, dass ich diesen Fehler erhalte:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to ****.com port 22 (#0)
* Trying ****...
* Connected to ****.com (****) port 22 (#0)
* SSH MD5 fingerprint: ****
* SSH authentication methods available: publickey,password,keyboard-interactive
* Using ssh public key file /home/****/.ssh/id_dsa.pub
* Using ssh private key file /home/****/.ssh/id_dsa
* SSH public key authentication failed: Unable to open public key file
* Initialized password authentication
* Authentication complete
* Upload failed: Operation failed (4/-31)
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Connection #0 to host ****.com left intact
curl: (79) Upload failed: Operation failed (4/-31)
Weiß jemand, wie man das Problem behebt?
Antwort1
Ich habe das Problem gelöst; ich musste den Zieldateinamen angeben.
Antwort2
Ich habe das gleiche Problem gelöst, indem ich dem Verzeichnispfad des Ziels das Zeichen "/" hinzugefügt habe, und zwar wie folgt:
curl --insecure --user ****:**** -T ./sourcefile.txt sftp://DestinationIP/directory/