Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1022)

Unified Diff: testing_support/gerrit-init.sh

Issue 19872002: Add .git-credentials file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698