got-your-back
got-your-back copied to clipboard
GYB won't create a new oauth2service.json when using --config-folder for custom location
I'm using this command to generate a backup of my Gmail account (personal account, not workspace/gsuite)
~/bin/gyb/gyb --config-folder ./Gmail-<redacted> --action create-project --email <redacted>@gmail.com
And the output is this
Creating project "Got Your Back Project"...
Checking project status...
Please go to:
https://console.cloud.google.com/start
and accept the Terms of Service (ToS). As soon as you've accepted the ToS popup, you can return here and press enter.
Creating project "Got Your Back Project"...
Checking project status...
enabling API drive.googleapis.com...
enabling API gmail.googleapis.com...
enabling API groupsmigration.googleapis.com...
enabling API iap.googleapis.com...
enabling API vault.googleapis.com...
Creating Service Account
ERROR: [Errno 2] No such file or directory: './Gmail-<redacted>/oauth2service.json'
* I've redacted the true email for obvious privacy reasons
Why won't it create the missing files it needs? Is this related to #345?
TL;DR: Create the --config-folder
directory before running the create-project
command.
I'm having the same issue. I'm trying to track it down.
I'm running on Ubuntu 20.04. My process so far was:
- Update Google API client
pip install --upgrade google-api-python-client
- Clone the current gyb git repo
- In the current gyb git repo directory, run a command similar to what @epifeny ran, inserting my email address and adding a
--local-folder
argument. - See the same error.
- Create the folder specified with the
--config-folder
option withmkdir
. - Rerun the
gyb.py
command again with the same options.
After creating the directory, it got past the step.
The resolution to the issue could be one of two options, to me:
- When running with
--action create-project
, if the--config-folder
does not exist, prompt the user to create it. - The user can create the directory manually before running the
create-project
command.