You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@continuum.apache.org by Srinivas Pavani <sp...@yahoo.com> on 2006/07/06 18:01:09 UTC

Site distribution url examples?

How do you specify the url for distribution management in the site section of
the pom.xml? I have Continuum building the site on the same machine as the
webserver. I need to copy the final site.war to
/var/www/docs/projects/${project.version}

I tried, the following:

     <url>scp://192.168.1.4/var/www/docs/project/{$project.version}</url>
  

I get an error:

[INFO] [site:deploy]
 Session error: com.jcraft.jsch.JSchException: reject HostKey: 192.168.1.4

Is there another mechanism to use for local deployment?

Thanks in advance for your help
- Srinivas

-- 
View this message in context: http://www.nabble.com/Site-distribution-url-examples--tf1901554.html#a5202517
Sent from the Continuum - Users forum at Nabble.com.


Re: Site distribution url examples?

Posted by Emmanuel Venisse <em...@venisse.net>.

Srinivas Pavani a écrit :
> Just wanted to follow up on the thread. I decided to use the 'file' protocol
> instead of scp as I am copying files on the local machine.
> 
> When looking at the source code for the maven-deploy-plugin, I found that
> the plugin looks in the .ssh directory for keys. As I mentioned earlier,
> Continuum is running on system startup (since I didn't really assign a user,
> I am assuming it runs as root). Even though the root folder has .ssh
> subfolder, I don't understand why the credentials are not being picked up.
> Perhaps someone who has installed this on the server can break down the
> install procedure so that scp can be performed from the build process.

the deploy plugin look at .ssh directory only for scp protocol.
I don't think service started at startup run with root user, probably nobody or guest.
You can choose the user to use in run.sh script with RUN_AS_USER var.

Emmanuel


RE: Site distribution url examples?

Posted by Srinivas Pavani <sp...@yahoo.com>.
Just wanted to follow up on the thread. I decided to use the 'file' protocol
instead of scp as I am copying files on the local machine.

When looking at the source code for the maven-deploy-plugin, I found that
the plugin looks in the .ssh directory for keys. As I mentioned earlier,
Continuum is running on system startup (since I didn't really assign a user,
I am assuming it runs as root). Even though the root folder has .ssh
subfolder, I don't understand why the credentials are not being picked up.
Perhaps someone who has installed this on the server can break down the
install procedure so that scp can be performed from the build process.
-- 
View this message in context: http://www.nabble.com/Site-distribution-url-examples--tf1901554.html#a5218512
Sent from the Continuum - Users forum at Nabble.com.


RE: Site distribution url examples?

Posted by Ba...@fastmobile.com.
Another thing you can do, is create a settings.xml (which, doesn't help with the security concerns Emmanuel listed) which contains something like:

<settings>
  <servers>
    <server>
      <id>website</id>
      <username>someusername</username>
      <password>password</password>
    </server>
  </servers>
</settings>

where the id matches up with the site id in your pom.xml. That should at least get you to be able to test out the functionality if nothing else.

Thanks,
Baron

-----Original Message-----
From: Emmanuel Venisse [mailto:emmanuel@venisse.net]
Sent: Thu 7/6/2006 12:55 PM
To: continuum-users@maven.apache.org
Subject: Re: Site distribution url examples?
 


Srinivas Pavani a écrit :
> Here is my scenario:
> 
> I am using Ubuntu 6.06 LTS server. Since the root access is always using
> sudo command and the root user password has not been set explicitly, I am
> prompted for root's password when I execute the following command manually:
> 
> sudo scp localhost:/home/buildmaster/working-directory/18/site/faq.html
> /var/www/docs/project/.
> 
> I am prompted for my password for sudo access followed by root's password.
> 
> Continuum is running as root on startup (following instructions for Debian
> startup on the Continuum site). Now I am not sure what to do.
> 
> It seems like I should enable the root password. Enter the password details
> in settings.xml for root. Is this correct or is there any other way to do
> this?

For the root password, it isn't a good idea to put it in a text file, it would be better to use 
private/public ssh keys or an account than can access only to the remote directory.

Emmanuel
> 
> Baron - the ssh key was accepted using localhost as well as the LAN ip
> address.



Re: Site distribution url examples?

Posted by Emmanuel Venisse <em...@venisse.net>.

Srinivas Pavani a écrit :
> Here is my scenario:
> 
> I am using Ubuntu 6.06 LTS server. Since the root access is always using
> sudo command and the root user password has not been set explicitly, I am
> prompted for root's password when I execute the following command manually:
> 
> sudo scp localhost:/home/buildmaster/working-directory/18/site/faq.html
> /var/www/docs/project/.
> 
> I am prompted for my password for sudo access followed by root's password.
> 
> Continuum is running as root on startup (following instructions for Debian
> startup on the Continuum site). Now I am not sure what to do.
> 
> It seems like I should enable the root password. Enter the password details
> in settings.xml for root. Is this correct or is there any other way to do
> this?

For the root password, it isn't a good idea to put it in a text file, it would be better to use 
private/public ssh keys or an account than can access only to the remote directory.

Emmanuel
> 
> Baron - the ssh key was accepted using localhost as well as the LAN ip
> address.


RE: Site distribution url examples?

Posted by Srinivas Pavani <sp...@yahoo.com>.
Here is my scenario:

I am using Ubuntu 6.06 LTS server. Since the root access is always using
sudo command and the root user password has not been set explicitly, I am
prompted for root's password when I execute the following command manually:

sudo scp localhost:/home/buildmaster/working-directory/18/site/faq.html
/var/www/docs/project/.

I am prompted for my password for sudo access followed by root's password.

Continuum is running as root on startup (following instructions for Debian
startup on the Continuum site). Now I am not sure what to do.

It seems like I should enable the root password. Enter the password details
in settings.xml for root. Is this correct or is there any other way to do
this?

Baron - the ssh key was accepted using localhost as well as the LAN ip
address.
-- 
View this message in context: http://www.nabble.com/Site-distribution-url-examples--tf1901554.html#a5204472
Sent from the Continuum - Users forum at Nabble.com.


RE: Site distribution url examples?

Posted by Ba...@fastmobile.com.
Even though it's a local machine, have you verified that you can scp a file to yourself? Perhaps you need to permanently accept the ssh key?


-----Original Message-----
From: Srinivas Pavani [mailto:sp_us@yahoo.com]
Sent: Thu 7/6/2006 11:01 AM
To: continuum-users@maven.apache.org
Subject: Site distribution url examples?
 

How do you specify the url for distribution management in the site section of
the pom.xml? I have Continuum building the site on the same machine as the
webserver. I need to copy the final site.war to
/var/www/docs/projects/${project.version}

I tried, the following:

     <url>scp://192.168.1.4/var/www/docs/project/{$project.version}</url>
  

I get an error:

[INFO] [site:deploy]
 Session error: com.jcraft.jsch.JSchException: reject HostKey: 192.168.1.4

Is there another mechanism to use for local deployment?

Thanks in advance for your help
- Srinivas

-- 
View this message in context: http://www.nabble.com/Site-distribution-url-examples--tf1901554.html#a5202517
Sent from the Continuum - Users forum at Nabble.com.



Re: Site distribution url examples?

Posted by meberts <ma...@promatis.de>.
Just in case the problem still exists or anyone else has the same problem (I
had it too...), here is the solution:
You need the server's adress in the [user]/.ssh/known_hosts file, which as
the name implies tells the scp command to accept this server's fingerprint.
The easiest way to get this done is to do a manual deploy command on the
server. This will lead to a something like that:
...
[INFO] [deploy:deploy]
The authenticity of host '###.###.###.###' can't be established.
RSA key fingerprint is d7:bd:11:1c:74:43:24:31:e1:b8:b8:fe:e9.
Are you sure you want to continue connecting? (yes/no):

Answering the question with 'yes' the known_hosts file will be created or
the key will be added to an existing file. Continuum doesn't do that (maybe
a point for future releases) and that's why this error message appears. Any
later deployments to this server will use this fingerprint for
authentification and no message appears.

M
-- 
View this message in context: http://www.nabble.com/Site-distribution-url-examples--tf1901554.html#a7987836
Sent from the Continuum - Users mailing list archive at Nabble.com.