Skip to content

Commit

Permalink
docs: add the usage of profile in "getting_started_with_cli.rst"
Browse files Browse the repository at this point in the history
PR Closed: #781
  • Loading branch information
yeyong.yu authored and yuyouyu32 committed Jul 6, 2021
1 parent 029c1e3 commit 9d70988
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/source/reference/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ visit the `developer page <https://gas.graviti.cn/tensorbay/developer>`_ to crea

For the usage of accesskey via Tensorbay SDK or CLI,
please see :ref:`SDK authorization <quick_start/getting_started_with_tensorbay:Authorize a Client Instance>`
or :ref:`CLI configration <tensorbay_cli/getting_started_with_cli:Configuration>`.
or :ref:`CLI configration <tensorbay_cli/getting_started_with_cli:Authentication>`.

branch
======
Expand Down
47 changes: 44 additions & 3 deletions docs/source/tensorbay_cli/getting_started_with_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ To use TensorBay CLI, please install TensorBay SDK first.

$ pip3 install tensorbay

***************
Configuration
***************
****************
Authentication
****************

An accessKey_ is used for identification when using TensorBay to operate datasets.

Expand Down Expand Up @@ -105,3 +105,44 @@ CLI: Commit the Draft
.. code:: html

$ gas commit tb:<dataset_name>#<draft_number> [-m <message>]

*********
Profile
*********

For users with multiple TensorBay accounts or different workspaces,
CLI provides profiles to easily authenticate and use different accessKeys.

Set the accessKey into the specific profile, and
show the specific profile's authentication information:

.. code:: html

$ gas -p <profile_name> auth [ACCESSKEY]
$ gas -p <profile_name> auth -g

After authentication, the profiles can be used to execute other commands:

.. code:: html

$ gas -p <profile_name> <command>

For example, list all the datasets with the given profile's accessKey:

.. code:: html

$ gas -p <profile_name> ls

For users who want to use a temporary accessKey,
CLI provides ``-k`` option to override the authentication:

.. code:: html

$ gas -k <Accesskey> <command>

For example, list all the datasets with the given accessKey:

.. code:: html

$ gas -k <AccessKey> ls

0 comments on commit 9d70988

Please sign in to comment.