You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bval.apache.org by co...@apache.org on 2010/05/25 21:57:00 UTC

[CONF] Apache Bean Validation > Release Setup

Space: Apache Bean Validation (http://cwiki.apache.org/confluence/display/BeanValidation)
Page: Release Setup (http://cwiki.apache.org/confluence/display/BeanValidation/Release+Setup)

Added by Donald Woods:
---------------------------------------------------------------------

These setup steps only need to be performed on a particular machine once.
{info}Developers using Linux workstations can skip over the references to Cygwin.  If using Windows, install cygwin, including *Utils/gnupg* and *Net/openssh* packages.
{info}

h3. Create and install a SSH key

# Open a shell window.  If using Windows, open a cygwin window.
# Use ssh-keygen to create an SSH key.
{note}Follow the latest steps and guides on the ASF website at [http://www.apache.org/dev/openpgp.html#generate-key] as you need to disable using SHA1 and new keys should be 4096 bits.{note}
{code:none}
$ ssh-keygen -t dsa -b 4096
{code}
* Program defaults should be fine.  No passphrase is required for the ssh key generation.  The keys will be saved in ~/.ssh/id_dsa (private) and ~/.ssh/id_dsa.pub (public).
{info} See [Authenticating By Public Key (OpenSSH)|http://www.networknewz.com/networknewz-10-20030707AuthenticatingbyPublicKeyOpenSSH.html] for a good description on why and how to perform this task.
{info}
# {{scp}} your SSH public key ~/.ssh/id_dsa.pub created in last step to ~/id_dsa.pub on people.apache.org.
{code:none} 
$ cd ~/.ssh
$ scp id_dsa.pub <your userid>@people.apache.org:id_dsa.pub 
$ You will be prompted for your password.
{code}
# Use ssh to login to people.apache.org 
{code:none}
$ cd ~
$ ssh <your userid>@people.apache.org
{code}
* At this point, you will still be prompted for your password.
# Create a ~/.ssh folder in your home directory on people.apache.org and change its file mode to 700.
{code:none}
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
{code}
# Move or append ~/id_dsa.pub to ~/.ssh/authorized_keys and change its file mode to 600.
{code:none}
$ mv ~/id_dsa.pub ~/.ssh/authorized_keys
$ chmod 600 ~/.ssh/authorized_keys
{code}
{info}
* Each public key in the {{authorized_keys}} spans only one line.
** For example: "{{ssh-dss AAAAB3NzaC1kc3MAAA ..... agBmmfZ9uAbSqA== dsa-key-20071107}}"
* '#' in the first column is a comment line.
{info}
# Exit out of this ssh session.
# Start a new ssh session.  No login should be required this time due to the private ssh key on your local box matching up with the public ssh key in your home directory (~/.ssh).
{code:none}
$ ssh <your userid>@people.apache.org
{code} 
{info}
If you are still prompted for a password, then you have not set up the ssh keys properly.  Review the steps above and ensure that all of the steps were followed properly.  Or, maybe the instructions are still not quite right and they still need some adjusting.  In that case, please update the instructions accordingly.  :-)
{info}


h3. Create a GPG key

# Open a shell window.  If using Windows, open a cygwin window.
# Generate a key-pair with gpg, using default key kind ("DSA and Elgamal") and ELG-E keys size (2048).
{code:none}
$ gpg --gen-key
{code}
* The program's default values should be fine.  For the "Real Name" enter your full name (ie. Stan Programmer).  For the "e-mail address" enter your apache address (ie. sprogrammer@apache.org).  You will also be required to enter a "passphrase" for the GPG key generation.  Keep track of this as you will need this for the Release processing.
{info}
* The generated keys are stored in $HOME/.gnupg or %HOME%\Application Data\gnupg subdirectory.
* Save the content in this subdirectory to a safe media. This contains your private key used to sign all the BVAL release materials.
{info}
# Backup your cygwin home directory to another media ||
# Add your public key to {{[https://svn.apache.org/repos/asf/incubator/bval/KEYS]}} and {{http://www.apache.org/dist/incubator/bval/KEYS}}. See the commands describe at the beginning of this KEYS file to perform this task. The gpg key-pair is used to sign the published artifacts for the BVAL releases. 
{code:none}
$ gpg --list-sigs <Real Name> && gpg --armor -- export <Real Name>
{code}
{info}The {{[https://svn.apache.org/repos/asf/incubator/bval/KEYS]}} file is updated via normal svn commit procedures.  The one under w.a.o/dist/ has to be manually updated from svn.
{info}
# Submit your public key to a key server. E.g. [http://pgp.surfnet.nl:11371/] or [http://pgp.mit.edu/]||
# Following the instructions in [http://people.apache.org/~henkp/trust/] and ask multiple (at least 3) current Apache committers to sign your public key.

h3. Update Maven settings for our servers

# Create a settings.xml under .m2
| | {code:xml|title=settings.xml|borderStyle=solid}
<settings xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
    <servers>
       <!-- SCP settings for people.apache.org -->
       <server>
          <id>people.apache.org</id>
          <username>$USERNAME</username>
          <privateKey>$PATH_TO_PRIVATE_KEY</privateKey>
          <passphrase>$SSH_PASSPHRASE</passphrase>
          <directoryPermissions>775</directoryPermissions>
          <filePermissions>644</filePermissions>
          <!-- following is only for Windows only
          <configuration>
              <sshExecutable>plink</sshExecutable>
              <scpExecutable>pscp</scpExecutable>
              <scpArgs>-2Bp</scpArgs>
              <sshArgs>-2</sshArgs>
          </configuration>
          -->
       </server>
       <!-- ASF Nexus settings -->
       <server>
           <id>apache.snapshots.https</id>
           <username>$USERNAME</username>
           <password>$APACHE_LDAP_PWD</password>
       </server>
       <server>
           <id>apache.releases.https</id>
           <username>$USERNAME</username>
           <password>$APACHE_LDAP_PWD</password>
       </server>
    </servers>    
</settings>
{code}
{info}
* {{$USERNAME}} is the remote username on people.apache.org, not your local userid.
* {{$PATH_TO_PRIVATE_KEY}} is the path to the private key generated for ssh. E.g. /home/yourLocalUserId/.ssh/id_dsa.  For Windows' cygwin users, you will need to enter the full cygwin path:  /cygdrive/c/cygwin/home/yourLocalUserId/.ssh/id_dsa.
* {{$SSH_PASSPHRASE}} for the supplied {{$PATH_TO_PRIVATE_KEY}}.  If you don't use this in your settings.xml file, then you will be prompted for it during the Release processing.
* {{$APACHE_LDAP_PWD}} is your Apache LDAP password, which is shared between SVN and password login for  people.apache.org.
{info}


Change your notification preferences: http://cwiki.apache.org/confluence/users/viewnotifications.action