TWiki
>
IT Web
>
SubversionRepository
(revision 9) (raw view)
Edit
Attach
---+ Local Subversion Repository A local [[http://subversion.tigris.org/][subversion]] repository is being setup, when ready this page will describe how to access it. For more information on subversion see the [[http://svnbook.red-bean.com/][Subversion book]] or the [[http://subversion.tigris.org/faq.html][Subversion FAQs]]. %TOC% ---++ Repository Organisation Currently there are four subversion repositories: * atlas - https://ppesvn.physics.gla.ac.uk/svn/atlas * lhcb - https://ppesvn.physics.gla.ac.uk/svn/lhcb * scotgrid - https://ppesvn.physics.gla.ac.uk/svn/scotgrid * test - https://ppesvn.physics.gla.ac.uk/svn/test * user - https://ppesvn.physics.gla.ac.uk/svn/user The test repository is as the name suggests for testing and getting used to using subversion. It will be cleaned out and reset on an irregular basis and without notice. NB: Browsers will often repeatedly ask for you to choose a certificate at this point. To get around this, you can (in Firefox) choose ==Edit >> Preferences>> Advanced== and click the radio button ==Select one Automatically== in the ==certificates== section. To request an additional repo contact the [[SystemAdministrators]] ---++ Trac Access All subversion subversion repositories have corresponding trac pages on the ppe web. They can be accessed at: * atlas - https://ppes8.physics.gla.ac.uk/trac/atlas * lhcb - https://ppes8.physics.gla.ac.uk/trac/lhcb * scotgrid - https://ppes8.physics.gla.ac.uk/trac/scotgrid * test - https://ppes8.physics.gla.ac.uk/trac/test * user - https://ppes8.physics.gla.ac.uk/trac/user NB: Browsers will often repeatedly ask for you to choose a certificate at this point. To get around this, you can (in Firefox) choose ==Edit >> Preferences>> Advanced== and click the radio button ==Select one Automatically== in the ==certificates== section. ---+ Using the repositories All users, once registered to access the repositories, have full read and write access to any files in any of the repositories. So please take care especially when committing changes and when setting up new directories. To help keep some order in the <code>user</code> repository please do not commit files into the top level repo directory. Instead create a directory named after your user name and store personal files/projects under this directory. <table width="100%" cellspacing="0"> <tr><td bgcolor="lightgreen">Creating a subdirectory inside the user repo</td></tr> <tr><td bgcolor="lightblue">$ svn mkdir https://ppesvn.physics.gla.ac.uk/svn/user/pickford -m "user repo dir"</td></tr> </table> For organising files/projects the subversion book [[http://svnbook.red-bean.com/]] describes some recommended possible layouts, in the section [[http://svnbook.red-bean.com/en/1.5/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout][Planning Your Repository Organization]]. ---+ Setting up access Access to the ppe subversion repository and the trac web pages is via grid certificate. Only users who have registered their certificate with the [[SystemAdministrators]] can access to either the repository or the trac pages. To register your certificate for access to the repository email ppesysman@physics.gla.ac.uk with your certificate distinguished name (DN). This can be found with the openssl command (the example assumes your certificate is in ~/.globus/usercert.pem): <table width="100%" cellspacing="0"> <tr><td bgcolor="lightgreen">Printing a certificates DN</td></tr> <tr><td bgcolor="lightblue">$ openssl x509 -in ~/.globus/usercert.pem -noout -subject</td></tr> </table> Once your certificate is registered for access no addition setup is require to access the trac pages however for access to the subversion repository additional setup is required. First if you do not have a <code>.subversion</code> directory in your home directory run <code>svn --version</code> to create one. Inside the <code>.subversion</code> directory is the file <code>servers</code> this file requires editing to access the repository. Edit the <code>groups</code> section of the file adding the line: <verbatim> ppe = *.physics.gla.ac.uk </verbatim> to create a ppe group. It should look something like: <verbatim> [groups] # group1 = *.collab.net # othergroup = repository.blarggitywhoomph.com # thirdgroup = *.example.com ppe = *.physics.gla.ac.uk </verbatim> note the <code>[groups]</code> line may need uncommenting by removing any leading <code>#</code>'s. Then add the following to the end of the <code>servers</code> file: <verbatim> [ppe] ssl-client-cert-file = /home/user_name/.globus/usercred.p12 ssl-authority-files = /home/user_name/.globus/usercert.pem </verbatim> Replacing user_name as appropriate. This assumes who have the pkcs12 version of your certificate in <code> /home/user_name/.globus/usercred.p12</code> and a x509 format copy of your certificate in /home/user_name/.globus/usercert.pem. Access to the subversion repository requires both. To convert a pkcs12 certificate into a pem format certificate/key file pair, use openssl: <table width="100%" cellspacing="0"> <tr><td bgcolor="lightgreen">Creating an x509 certificate from a pkcs12 certificate</td></tr> <tr><td bgcolor="lightblue">$ openssl pkcs12 -in usercred.p12 -nokeys -clcerts -out usercert.pem</td></tr> </table> <table width="100%" cellspacing="0"> <tr><td bgcolor="lightgreen">Creating an x509 key from a pkcs12 certificate</td></tr> <tr><td bgcolor="lightblue">$ openssl pkcs12 -in usercred.p12 -nocerts -out userkey.pem</td></tr> </table> The userkey.pem should then be made readable and writable only by the user by doing a <code>chmod 600 userkey.pem</code>. Note the password used to encrypt the <code>userkey.pem</code> file should be a strong one, this file is the private key for your grid certificate. Then place <code>userkey.pem</code> and <code>usercert.pem</code> and <code>usercred.p12</code> in <code>~/.globus/</code> Access to the repository can be tested using: <table width="100%" cellspacing="0"> <tr><td bgcolor="lightgreen">Testing repository access by listing the contents of the test repository</td></tr> <tr><td bgcolor="lightblue">$ svn list https://ppesvn.physics.gla.ac.uk/svn/test</td></tr> </table> you will be asked for your grid certificate password each time you access the repository. ---++ Using a proxy certificate to access the repository To avoid having to type a password in each time the repository is accessed a proxy certificate can be used. In order to do this the certificate pointed to in the <code>~/.subversion/servers</code> file must be changed from: <verbatim> ssl-client-cert-file = /home/user_name/.globus/usercred.p12 </verbatim> to: <verbatim> ssl-client-cert-file = /tmp/pkcs12up_uXXXX </verbatim> replacing XXXX with the output of the command <code>id -u</code>. Then to create a proxy certificate first source <code>grid-env.sh</code> (or <code>grid-env.csh</code>, see [[GridServices]]) and then create the proxy using <code>svn-grid-proxy-init</code> <table width="100%" cellspacing="0"> <tr><td bgcolor="lightgreen">Creating a proxy certificate to access the svn repository</td></tr> <tr><td bgcolor="lightblue">$ source /data/ppe01/sl44/i386/grid/glite-ui/latest/external/etc/profile.d/grid-env.sh</td></tr> <tr><td bgcolor="lightblue">$ svn-grid-proxy-init</td></tr> </table> After typing in your grid certificate password the script will generate a proxy valid for 12 hours. This works on both Scientific Linux 4 and Scientific Linux 5 ppe machines. On external machines the %ATTACHURL%/svn-grid-proxy-init script should work on any system where the EGEE gLite tools are installed. ---++ Setting up access with Ubuntu It is possible that trying to use SVN with Ubuntu can give you the error message <verbatim> svn: OPTIONS of 'https://ppesvn.physics.gla.ac.uk/svn/test': Could not read status line: SSL error: Key usage violation in certificate has been detected. (https://ppesvn.physics.gla.ac.uk) </verbatim> If this is the case, it might be something to do with having too recent a version of subversion compared to what is used in SL. The fix (that worked for me) was found [[http://ubuntuforums.org/showthread.php?t=1046684][here]]. ---+ Email notification of commits To setup automatic email notification of commits create a file called =!email-notify-list.svn= containing a list of email addresses in the subversion repository. When any changes are made to files in the directory containing =!email-notify-list.svn= or in any directory below this directory an email will sent out automatically to the email addresses listed in =!email-notify-list.svn= file. If the project layout follows the suggested subversion layout of =branches=, =tags= and =trunk= directories then the =!email-notify-list.svn= file should go in the same directory as the =branch=, =tags= and =trunk= directories. eg: <verbatim> project_name/!email-notify-list.svn project_name/branches project_name/tags project_name/trunk </verbatim> Multiple =!email.notify.list.svn= files are also possible for example: <verbatim> project_name/!email-notify-list.svn project_name/branches project_name/tags project_name/trunk project_name/trunk/!email-notify-list.svn </verbatim> people listed in =project_name/!email-notify-list.svn= will be notified of all changes made to the project and people listed in =project_name/trunk/!email-notify-list.svn= will only be notified when changes are made in =project_name/trunk/= and below. Notes: * In the case of the same email address being listed multiple times (either in the same file or multiple files) only one email will be sent. * To edit files beginning with a =!= from a linux shell the explanation mark requires escaping, i.e. =nano \!email-notify-list.svn=. -- Main.AndrewPickford - 12 Dec 2008
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
ext
svn-grid-proxy-init
r1
manage
0.2 K
2008-12-12 - 16:49
AndrewPickford
script to create a pkcs12 proxy using grid-proxy-init
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r14
|
r11
<
r10
<
r9
<
r8
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r9 - 2011-10-02
-
AlistairGemmell
IT
Log In
or
Register
IT Web
Create New Topic
Index
Search
Changes
Notifications
RSS Feed
Statistics
Preferences
Webs
ATLAS
PUUKA
DetDev
Gridmon
IT
LHCb
LinearCollider
Main
NA62
Sandbox
TWiki
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback