| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 set -e | 6 set -e |
| 7 | 7 |
| 8 http_port=8080 | 8 http_port=8080 |
| 9 ssh_port=29418 | 9 ssh_port=29418 |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 echo " to download the latest version." 1>&2 | 140 echo " to download the latest version." 1>&2 |
| 141 exit 1 | 141 exit 1 |
| 142 fi | 142 fi |
| 143 | 143 |
| 144 # By default, gerrit only accepts https connections, which is a good thing. But | 144 # By default, gerrit only accepts https connections, which is a good thing. But |
| 145 # for testing, it's convenient to enable plain http. Also, turn off all email | 145 # for testing, it's convenient to enable plain http. Also, turn off all email |
| 146 # notifications. | 146 # notifications. |
| 147 mkdir -p "${rundir}/etc" | 147 mkdir -p "${rundir}/etc" |
| 148 cat <<EOF > "${rundir}/etc/gerrit.config" | 148 cat <<EOF > "${rundir}/etc/gerrit.config" |
| 149 [auth] | 149 [auth] |
| 150 » type = http | 150 » type = DEVELOPMENT_BECOME_ANY_ACCOUNT |
| 151 gitBasicAuth = true | 151 gitBasicAuth = true |
| 152 [gerrit] | 152 [gerrit] |
| 153 canonicalWebUrl = http://$(hostname):${http_port}/ | 153 canonicalWebUrl = http://$(hostname):${http_port}/ |
| 154 [httpd] | 154 [httpd] |
| 155 listenUrl = http://*:${http_port}/ | 155 listenUrl = http://*:${http_port}/ |
| 156 [sshd] | 156 [sshd] |
| 157 listenAddress = *:${ssh_port} | 157 listenAddress = *:${ssh_port} |
| 158 [sendemail] | 158 [sendemail] |
| 159 enable = false | 159 enable = false |
| 160 EOF | 160 EOF |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 To use SSH API: | 198 To use SSH API: |
| 199 ssh ${username}@localhost -p ${ssh_port} -i ${rundir}/tmp/id_rsa gerrit | 199 ssh ${username}@localhost -p ${ssh_port} -i ${rundir}/tmp/id_rsa gerrit |
| 200 | 200 |
| 201 To enable 'git push' without a password prompt: | 201 To enable 'git push' without a password prompt: |
| 202 git config credential.helper 'store --file=${rundir}/tmp/.git-credentials' | 202 git config credential.helper 'store --file=${rundir}/tmp/.git-credentials' |
| 203 | 203 |
| 204 To stop the server: | 204 To stop the server: |
| 205 ${rundir}/bin/gerrit.sh stop | 205 ${rundir}/bin/gerrit.sh stop |
| 206 | 206 |
| 207 EOF | 207 EOF |
| OLD | NEW |