This will use your Google OAuth2 user to create a suitable service account

cr_setup_auth(
  email = Sys.getenv("GARGLE_EMAIL"),
  file = "googlecloudrunner-auth-key.json",
  session_user = NULL
)

Arguments

email

What email to open OAuth2 with

file

Where to save the authentication file

session_user

1 for user level, 2 for project level, leave NULL to be prompted

Value

TRUE if the file is ready to be setup by cr_setup, FALSE if need to stop

See also

Other setup functions: cr_setup_service(), cr_setup_test(), cr_setup()