Index: testing_support/gerrit-init.sh |
diff --git a/testing_support/gerrit-init.sh b/testing_support/gerrit-init.sh |
index 6b77ab7dc64a524d4a88a0c8c260be62f6f43a29..e19cf9bb6fd4b0a503388289ebf1e5ca93e345da 100755 |
--- a/testing_support/gerrit-init.sh |
+++ b/testing_support/gerrit-init.sh |
@@ -129,6 +129,11 @@ cat <<EOF > "${rundir}/tmp/.netrc" |
machine localhost login ${username} password ${password} |
EOF |
+# Create a .git-credentials file, to enable password-less push. |
+cat <<EOF > "${rundir}/tmp/.git-credentials" |
+http://${username}:${password}@localhost:8080 |
+EOF |
+ |
echo |
echo "To start gerrit server:" |
echo " ${rundir}/bin/gerrit.sh start" |
@@ -136,6 +141,9 @@ echo |
echo "To use the REST API:" |
echo " curl --netrc-file ${rundir}/tmp/.netrc http://localhost:8080/<endpoint>" |
echo |
+echo "To enable 'git push' without a password prompt:" |
+echo " git config credential.helper 'store --file=${rundir}/tmp/.git-credentials'" |
+echo |
echo "To stop the server:" |
echo " ${rundir}/bin/gerrit.sh stop" |
echo |