commit | 2ffbce93326c9512900d0f08e51221a1073ab89c | [log] [tgz] |
---|---|---|
author | Han-Wen Nienhuys <hanwen@google.com> | Wed Nov 08 19:50:54 2017 +0100 |
committer | Han-Wen Nienhuys <hanwen@google.com> | Wed Nov 08 19:52:44 2017 +0100 |
tree | bb7a9b6469c52e2bc4c04925c5121a8cd3c971dc | |
parent | 20d696109fee8b4b6018f3b686eab386047dd9bb [diff] |
Add copyright headers Change-Id: I59b9627ce3b55f44f0b042e52bda0be20596af13
The git-cookie-authdaemon
uses the GCE metadata server to acquire an OAuth2 access token and configures git
to always present this OAuth2 token when connecting to googlesource.com or Google Cloud Source Repositories.
Launch the GCE VMs with the gerritcodereview scope requested, for example:
gcloud compute instances create \ --scopes https://www.googleapis.com/auth/gerritcodereview \ ...
Install the daemon within the VM image and start it running:
sudo apt-get install git git clone https://gerrit.googlesource.com/gcompute-tools/ ./gcompute-tools/git-cookie-authdaemon
The daemon launches itself into the background and continues to keep the OAuth2 access token fresh.