Public Repository

Last pushed: 2 years ago
Short Description
Google Account Manager (GAM): https://github.com/jay0lee/GAM
Full Description

Google Account Manager (GAM)

GAM Version

3.63

Installation

  1. Follow the instructions to create the client secrets files as oulined here: https://github.com/jay0lee/GAM/wiki/CreatingClientSecretsFile
  2. Move your client secrets files to a .gam subdirectory of your home folder:
    mkdir ~/.gam
    mv client_secrets.json ~/.gam
    mv oauth2service.json ~/.gam
    
  3. After the first time you run gam (see below), it will create a file called oauth2.txt. Move that file to the .gam folder so you don't have to re-authorize every time you run the gam container. With the gam container running:
    docker cp gam:/gam/GAM-3.63/src/oauth2.txt ~/.gam
    

Running the container

I recommend creating the following as a script named run.sh to run the gam container.

#!/bin/sh

GAM_DIR=~/.gam
if [[ "$(uname -s)" =~ MINGW(32|64)_NT ]]; then
    # Windows docker machine
    GAM_DIR="/c/Users/$(whoami)/.gam"
fi
docker run -it --rm \
  -v "${GAM_DIR}"/client_secrets.json:/gam/GAM-3.63/src/client_secrets.json \
  -v "${GAM_DIR}"/oauth2service.json:/gam/GAM-3.63/src/oauth2service.json \
  -v "${GAM_DIR}"/oauth2.txt:/gam/GAM-3.63/src/oauth2.txt \
  --name gam \
  jonathandandries/gam $@

You may need to set permissions so you can run the script:

chmod u+x run.sh

Now you can run the gam container in one of two ways:

  1. Drop to a bash shell (default): ./run.sh then run gam commands, e.g.: gam info domain, or
  2. Pass parameters to run a single command, e.g.: ./run.sh gam info domain
Docker Pull Command
Owner
jonathandandries

Comments (0)