mirror of
https://github.com/88lex/sa-gen.git
synced 2025-02-24 15:44:29 +08:00
Update README.md
This commit is contained in:
parent
6cfaf12d47
commit
4bd30c6316
1 changed files with 12 additions and 9 deletions
21
README.md
21
README.md
|
@ -9,10 +9,9 @@ directory that you specify in `KEYS_DIR` in the script.
|
||||||
The script also creates a csv file in the `KEYS_DIR` directory that can be used to bulk upload service account emails to a google group,
|
The script also creates a csv file in the `KEYS_DIR` directory that can be used to bulk upload service account emails to a google group,
|
||||||
which can then be added to your Team Drives and/or My Drive folders. This allows you to use service accounts with rclone sync/copy
|
which can then be added to your Team Drives and/or My Drive folders. This allows you to use service accounts with rclone sync/copy
|
||||||
|
|
||||||
gcloud sdk can be installed with ```curl https://sdk.cloud.google.com | bash```
|
If you have already installed `gcloud sdk` please be sure you have initialized the account for which you wish to create projects ans service accounts.
|
||||||
or you can go to ```https://cloud.google.com/sdk/docs/quickstarts``` to read more and install in non-linux OSes.
|
If you have not installed `gcloud sdk` please go to `https://cloud.google.com/sdk/docs/quickstarts` and follow instructions to install for your OS,
|
||||||
Once you have installed gcloud sdk then you need to run `gcloud init` and authorize (auth) to the account for which
|
Once you have installed gcloud sdk be sure to run `gcloud init` and authorize (auth) to the account for which you want to create service accounts.
|
||||||
you want to create service accounts.
|
|
||||||
|
|
||||||
There are a number of variables that you need to specify to run sa-gen for your own account, and to create service accounts and jsons
|
There are a number of variables that you need to specify to run sa-gen for your own account, and to create service accounts and jsons
|
||||||
that are names the way you want to name them. These variables are described below. The names and numeric ranges are quite flexible -
|
that are names the way you want to name them. These variables are described below. The names and numeric ranges are quite flexible -
|
||||||
|
@ -23,11 +22,15 @@ This is the location where you want to store your service account json keys. Ple
|
||||||
Note that you can create a maximum of 100 service accounts per project, but you can store all of your json keys in this
|
Note that you can create a maximum of 100 service accounts per project, but you can store all of your json keys in this
|
||||||
directory as long as the json file names do not overlap.
|
directory as long as the json file names do not overlap.
|
||||||
|
|
||||||
**export ORGANIZATION_ID=123456789012**
|
**export ORGANIZATION_ID=""**
|
||||||
This needs to be replace with your own ORGANIZATION_ID. It is the numeric ID, rather than your account/domain name.
|
This can be left blank ( "" ) if you have already initialized the organization in gcloud sdk with `gcloud init`.
|
||||||
To find your own ORGANIZATION ID go to https://console.cloud.google.com/iam-admin/settings. Under Organization name you will see the numeric `OrganizationID`.
|
However if you want to be certain then you can manually replace it with your own ORGANIZATION_ID. It is a numeric ID, rather than your account/domain name.
|
||||||
Alternatively you can choose your organization by manually running `gcloud init` after installing the sdk. If you do this then you
|
The easiest way find your own ORGANIZATION ID is to use the console where you have installed `gcloud sdk` and type the command `gcloud organizations list`.
|
||||||
can leave it blank ==> `ORGANIZATION_ID=""`
|
This will show you your DISPLAY_NAME, ID, and DIRECTORY_CUSTOMER_ID. The 12 digit number in the middle is your ORGANIZATION_ID. Insert that
|
||||||
|
number in the script.
|
||||||
|
If for some reason you cannot find the ORGANIZATION_ID using the gcloud sdk you can also go to https://console.cloud.google.com/iam-admin/settings.
|
||||||
|
On that screen go to the top. Choose `Select Project`, then in the popup choose `Select From` and choose your account/domain name. You should see
|
||||||
|
a column titled ID. The 12 digit number next to your account/domain name is the ORGANIZATION_ID.
|
||||||
|
|
||||||
**export GROUP_NAME=mygroup@mydomain.com**
|
**export GROUP_NAME=mygroup@mydomain.com**
|
||||||
This is the name of the group that you will share your team drives or my drive folders with.
|
This is the name of the group that you will share your team drives or my drive folders with.
|
||||||
|
|
Loading…
Reference in a new issue