Tools for Google Compute Engine

Clone this repo:


  1. 20d6961 Move to metadata server v1 API by Shawn Pearce · 11 months ago master
  2. 58a58ca Simple for the git-cookie-authdaemon by Shawn Pearce · 11 months ago
  3. 7278586 Also configure by Shawn Pearce · 11 months ago
  4. 4e2fa66 Add a --nofork flag by Razvan Musaloiu-E · 3 years, 3 months ago
  5. ca277e1 Fix bad use of context manager in git-cookie-authdaemon. by Torne (Richard Coles) · 4 years, 8 months ago

Git authentication tools for Google Compute Engine

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 or Google Cloud Source Repositories.


Launch the GCE VMs with the gerritcodereview scope requested, for example:

gcloud compute instances create \
  --scopes \


Install the daemon within the VM image and start it running:

sudo apt-get install git
git clone

The daemon launches itself into the background and continues to keep the OAuth2 access token fresh.