| | 63 | |
| | 64 | === Direct write access === |
| | 65 | |
| | 66 | Note: you don't need direct write access to contribute code to BOINC. Given the [http://git-scm.com/about/distributed distributed nature] of git you can also publish your contributions elsewhere (e.g. on [https://github.com GitHub]) or send your patches via mail (using {{{git format-patch}}}). |
| | 67 | |
| | 68 | Direct write access to the official repositories in currently available via the SSH protocol (with public-key authentication). If you think you need direct write you should contact David Anderson and/or Rom Walton. They'll ask you for your public-key. Here's how you can create one and use it after you've been grated access to the repository: |
| | 69 | |
| | 70 | ==== Windows users ==== |
| | 71 | |
| | 72 | Please see [http://boinc.berkeley.edu/trac/wiki/SourceCodeGit/Windows this page] for details. |
| | 73 | |
| | 74 | ==== !Linux/Mac OS X users ==== |
| | 75 | |
| | 76 | * General note: before you start, please check whether you already have an existing key at {{{~/.ssh/id_rsa}}}. If so, please choose a different key filename for the commands below! Alternatively, you could also reuse the existing key and continue with the final step. |
| | 77 | * Note to Mac OS X users: if you prefer "Finder" over "Terminal" hit CMD+SHIFT+G in "Finder", then enter {{{~/.ssh}}} to go to that hidden folder. |
| | 78 | |
| | 79 | The following shell/terminal command will create a key pair that gets stored in your {{{~/.ssh}}} directory: |
| | 80 | * Public key: {{{~/.ssh/id_rsa.pub}}} |
| | 81 | * Private key: {{{~/.ssh/id_rsa}}} |
| | 82 | {{{ |
| | 83 | ssh-keygen -t rsa 4096 -f ~/.ssh/id_rsa |
| | 84 | }}} |
| | 85 | |
| | 86 | If you had to use a different key filename because of an existing key that you don't want to overwrite or reuse, you can define a so called ssh host alias that allows you to specify which key to use when accessing the BOINC repo. In order to do so, add the following to {{{~/.ssh/config}}} (create the file if necessary), assuming that you created the ssh key as {{{~/.ssh/boinc-key}}}: |
| | 87 | {{{ |
| | 88 | host boinc-git |
| | 89 | Hostname isaac.ssl.berkeley.edu |
| | 90 | Port 22 |
| | 91 | IdentityFile ~/.ssh/boinc-key |
| | 92 | User gitolite |
| | 93 | }}} |
| | 94 | |
| | 95 | Now that you have the host alias defined you may access the repo using the alias in the clone URL (instead of the full user/hostname information): |
| | 96 | |
| | 97 | {{{ |
| | 98 | git clone boinc-git:boinc.git |
| | 99 | }}} |
| | 100 | |
| | 101 | Finally, send the public key to David or Rom. Important: the private key should never leave your system! Keep it safe! |