git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@677532 13f79535-47bb-0310-9956-ffa450edef68master
@@ -203,6 +203,10 @@ Other changes: | |||||
* <sql> "output" attribute now supports any Resource in addition to a file. | * <sql> "output" attribute now supports any Resource in addition to a file. | ||||
* <scp> no longer requires a passphrase when using key based | |||||
authentication. | |||||
Bugzilla report 33718. | |||||
Changes from Ant 1.7.0 TO Ant 1.7.1 | Changes from Ant 1.7.0 TO Ant 1.7.1 | ||||
============================================= | ============================================= | ||||
@@ -156,8 +156,7 @@ for more information. This task has been tested with jsch-0.1.2 and later.</p> | |||||
<tr> | <tr> | ||||
<td valign="top">passphrase</td> | <td valign="top">passphrase</td> | ||||
<td valign="top">Passphrase for your private key.</td> | <td valign="top">Passphrase for your private key.</td> | ||||
<td valign="top" align="center">Yes, if you are using key based | |||||
authentication.</td> | |||||
<td valign="top" align="center">No, defaults to an empty string.</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td valign="top">verbose</td> | <td valign="top">verbose</td> | ||||
@@ -353,15 +353,15 @@ public class Scp extends SSHBase { | |||||
setUsername(uri.substring(0, indexOfColon)); | setUsername(uri.substring(0, indexOfColon)); | ||||
setPassword(uri.substring(indexOfColon + 1, indexOfAt)); | setPassword(uri.substring(indexOfColon + 1, indexOfAt)); | ||||
} else if (indexOfAt > -1) { | } else if (indexOfAt > -1) { | ||||
// no password, will require passphrase | |||||
// no password, will require keyfile | |||||
setUsername(uri.substring(0, indexOfAt)); | setUsername(uri.substring(0, indexOfAt)); | ||||
} else { | } else { | ||||
throw new BuildException("no username was given. Can't authenticate."); | throw new BuildException("no username was given. Can't authenticate."); | ||||
} | } | ||||
if (getUserInfo().getPassword() == null | if (getUserInfo().getPassword() == null | ||||
&& getUserInfo().getPassphrase() == null) { | |||||
throw new BuildException("neither password nor passphrase for user " | |||||
&& getUserInfo().getKeyfile() == null) { | |||||
throw new BuildException("neither password nor keyfile for user " | |||||
+ getUserInfo().getName() + " has been " | + getUserInfo().getName() + " has been " | ||||
+ "given. Can't authenticate."); | + "given. Can't authenticate."); | ||||
} | } | ||||