You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user-guides/using-divbase-programmatically.md
+5-6Lines changed: 5 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,9 @@ See [Account Management — Personal Access Tokens](./account-management.md#pers
12
12
13
13
You can store/use a PAT in two ways
14
14
15
-
### Option 1 — Let `divbase-cli` handle storing the PAT (recommended)
15
+
### (Recommended) — Let `divbase-cli` handle storing the PAT
16
16
17
-
After creating a PAT on the website, store it on your device by copy pasting the pre-filled commands shown on the website, it will look something like this:
17
+
After creating a PAT on the DivBase website, store it on your device by copy pasting the pre-filled commands shown on the website, it will look something like this:
You will be prompted to paste the token value. It is then stored securely in your OS keyring (or in a restricted file if no keyring is available) and used automatically on every subsequent `divbase-cli` command.
26
+
You will be prompted to paste the token value. It will then be stored securely in your OS keyring (or in a restricted file if no keyring is available) and used automatically on every subsequent `divbase-cli` command.
27
27
28
28
```bash
29
29
divbase-cli auth pat-info # show name and expiry of the stored PAT
@@ -33,7 +33,7 @@ divbase-cli auth rm-pat # remove the stored PAT from this device
33
33
!!! info "This strategy works on HPC clusters"
34
34
On the login node with divbase-cli [installed as we recommend](./installation.md), store the PAT as described above. The token will be available to all your jobs running on the cluster, without needing to worry about setting any environment variables in your job scripts.
35
35
36
-
### Option 2 — Environment variable
36
+
### (Not recommended alternative) — Store the PAT in an environment variable
37
37
38
38
Set `DIVBASE_API_PAT` in your shell or job script:
39
39
@@ -44,8 +44,7 @@ divbase-cli files ls
44
44
45
45
You may prefer this if you want explicit per-job control of which token is used.
46
46
47
-
1. Store it securely on your device using `divbase-cli auth add-pat` (recommended and works on HPC clusters!)
48
-
2. Set it as an environment variable `DIVBASE_API_PAT` (can give you more control over which token is used when)
47
+
---
49
48
50
49
!!! question "What if I have both an active login session and a personal access token set?"
0 commit comments