You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Grant Ingersoll <GS...@syr.edu> on 2005/08/16 16:51:11 UTC

Re: [MavenBook] Using a public/private key scheme for site deployment

Here is our internal docs on how to do this (Your mileage may vary):
---
In order to do deployments to the maven repository, you need to have a public/private key pair setup on
your machine and setup the correct authorization on the remote machine.

On your windows machine (with Cygwin SSH installed)

   1. ssh-keygen -b 2048 -t rsa
          * If you want the key to be used in an automated setting, use an empty passphrase when the program asks for it (i.e., hit enter at the prompt without typing anything else first). 
   2. Copy the .ssh directory created at <path to user home>/.ssh/ to your Windows user home (i.e. C:\Documents and Settings\username\)
   3. Append the public key (id_rsa.pub) to your <path to user home>/.ssh/authorized_keys file on the remote machine. If you don't already have the directory or the file, first create the <path to user home>/.ssh/ directory, then copy the id_rsa.pub file to the remote machine, and finally rename it to <path to user home>/.ssh/authorized_keys.
   4. You should be ready to go.


In your project.properties, setup the necessary properties for locating the REPO:
#Publication
#maven.site.stage.directory=
maven.site.deploy.method=fs
#list of repositories to which we will deploy. 
#There are 4 repositories
maven.repo.list=REPO
maven.repo.REPO=scp://<machine name>
maven.repo.REPO.directory=/path/to/repo
maven.repo.REPO.username=${user.name}
maven.repo.REPO.privatekey=${user.home}/.ssh/id_rsa

---
You may have to do something additional for site deploy, as this is jar:deploy.  For site:deploy, I have been using a mapped Samba drive.  But this definitely works for jar:deploy, so I imagine it isn't that different for sites.

Good luck.

----------------------------------------------------------------------
Grant Ingersoll
Sr. Software Engineer
Center for Natural Language Processing
Syracuse University
School of Information Studies
337 Hinds Hall
Syracuse, NY 13244

http://www.cnlp.org
Voice:  315-443-5484
Fax: 315-443-6886

>>> sebastien.arbogast@gmail.com 08/16/05 9:53 AM >>>
Hi,

First of all I'd like to thank and congratulate Vincent Massol and Tim
O'Brien for this excellent book I'm reading right now (Maven, A Developer's
Notebook). It's really excellent and enables me to use Maven at full
capacity.

But I have a problem with one of the tips concerning site deployment
(Chapter 4, page 124) which recommends to use a public/private key scheme
for SSH when deploying the site. The problem is that I've just installed
Cygwin and it's OpenSSH port on my windows box, but I don't know how to
configure it to use that scheme. It works great using password for artifact
deployment, but for site deployment, it hangs because of authentication
failure.

I'm aware of the fact that this question may be a little off topic, but as
it deals with a book about Maven, someone who has already solved that issue
could give me a link to a tutorial or give me a few guidelines here. Why not
a tip that could be added to MavenBook website...?

Thanks in advance.

--
Sébastien Arbogast
The Epseelon Project : http://www.epseelon.org 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org 
For additional commands, e-mail: users-help@maven.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org