maven-wagon-plugin を使用して、ec2 ubuntu インスタンスで scp 経由でいくつかのパペット ファイルをコピーしようとしています。秘密鍵ファイルのパスを settings.xml に追加し、pom.xml 内でプラグインの使用法を定義しました (以下を参照)。
パテでマシンに接続できます。また、 wagon は次のように表示されるため、接続を確立できるようです。
The authenticity of host 'ec2-....compute-1.amazonaws.com' can't be established.
RSA key fingerprint is 79:..:c7.
Are you sure you want to continue connecting? (yes/no): yes
それでも、プラグインは私の認証が間違っていることを教えてくれます:
[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-
4:upload (upload-puppet-module) on project ...:
Unable to create a Wagon instance for scp://ec2-...compute-1.amazonaws.com/:
Cannot connect. Reason: Auth fail -> [Help 1]
私のsettings.xmlは次のようになります:
...
<server>
<id>ec2-node</id>
<username>ubuntu</username>
<privateKey>.../path/to/privatekey.ppk</privateKey>
</server>
...
私の pom.xml は次のようになります。
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
<version>2.4</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>1.0-beta-4</version>
<executions>
<execution>
<id>upload-puppet-module</id>
<phase>pre-integration-test</phase>
<goals>
<goal>upload</goal>
</goals>
<configuration>
<id>ec2-node</id>
<fromDir>${basedir}/src/main/resources/puppet-module</fromDir>
<includes>*</includes>
<url>scp://ec2-...compute-1.amazonaws.com/</url>
<toDir>/etc/puppet/modules/</toDir>
<filePermissions>664</filePermissions>
<directoryPermissions>775</directoryPermissions>
</configuration>
</execution>
</executions>
それを機能させるために私にできることはありますか?
前もって感謝します!