X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/94eca7452812a90d68dd29dc62fe2ac5c5157568..2f83fcd45b4b23db2bb5bb4afbe1e863ebd77ec6:/doc/user/reference/api-tokens.html.textile.liquid diff --git a/doc/user/reference/api-tokens.html.textile.liquid b/doc/user/reference/api-tokens.html.textile.liquid index d47c1ccdae..4c35530e60 100644 --- a/doc/user/reference/api-tokens.html.textile.liquid +++ b/doc/user/reference/api-tokens.html.textile.liquid @@ -1,61 +1,36 @@ --- layout: default navsection: userguide -navmenu: Reference title: "Getting an API token" - ... +{% comment %} +Copyright (C) The Arvados Authors. All rights reserved. -h1. Reference: Getting an API token - -The Arvados API token is a secret key that enables the @arv@ command line client to access Arvados with the proper permissions. - -Access the Arvados workbench using this link: "https://workbench.{{ site.arvados_api_host }}/":https://workbench.{{ site.arvados_api_host }}/ - -(Replace @{{ site.arvados_api_host }}@ with the hostname of your local Arvados instance if necessary.) +SPDX-License-Identifier: CC-BY-SA-3.0 +{% endcomment %} -First, open a shell on the system on which you intend to use the Arvados client (this may be your local workstation, or an Arvados VM, refer to "Accessing Arvados over ssh":{{site.baseurl}}/user/getting_started/ssh-access.html ) . +The Arvados API token is a secret key that enables the Arvados command line tools to authenticate themselves. -Click on the user icon in the upper right corner to access the user settings menu, and click on the menu item _Manage API token_ to go to the "api client authorizations" page. +Access the Arvados Workbench using this link: "{{site.arvados_workbench_host}}/":{{site.arvados_workbench_host}}/ (Replace the hostname portion with the hostname of your local Arvados instance if necessary.) -h2. The easy way +Open a shell on the system where you want to use the Arvados client. This may be your local workstation, or an Arvados virtual machine accessed with "Webshell":{{site.baseurl}}/user/getting_started/vm-login-with-webshell.html or SSH (instructions for "Unix":{{site.baseurl}}/user/getting_started/ssh-access-unix.html#login or "Windows":{{site.baseurl}}/user/getting_started/ssh-access-windows.html#login). -For your convenience, the "api client authorizations" page on Workbench provides a "Help" tab that provides a command you may copy and paste directly into the shell. It will look something like this: +In the Arvados Workbench, click on the dropdown menu icon in the upper right corner of the top navigation menu to access the _Account Management_ menu. Then, in the pop-up menu, click on the menu item *Get API token*. This will open a dialog box that lists your current token and the instructions for setting up your environment. -bc. ### Pasting the following lines at a shell prompt will allow Arvados SDKs -### to authenticate to your account, youraddress@example.com -read ARVADOS_API_TOKEN < -
$ export ARVADOS_API_HOST={{ site.arvados_api_host }}
-$ export ARVADOS_API_TOKEN=2jv9346o3966345u7ueuim7a1zaaoueo3w90tzq3gx0es7j1ld
-
- - -* @ARVADOS_API_HOST@ tells @arv@ which host to connect to -* @ARVADOS_API_TOKEN@ is the secret key used by the Arvados API server to authenticate access. - -If you are connecting to a development instance with a unverified/self-signed SSL certificate, set this variable to skip SSL validation: - - -
$ export ARVADOS_API_HOST_INSECURE=1
-
-
+* The @export@ command puts a local shell variable into the environment that will be inherited by child processes such as the @arv@ client. h2. settings.conf -Arvados tools will also look for the authentication information in @~/.config/arvados/settings.conf@. If you have already put the variables into the environment with instructions above, you can use these commands to create an Arvados configuration file: +Arvados tools will also look for the authentication information in @~/.config/arvados/settings.conf@. If you have already put the variables into the environment following the instructions above, you can use these commands to create an Arvados configuration file:
$ echo "ARVADOS_API_HOST=$ARVADOS_API_HOST" > ~/.config/arvados/settings.conf
@@ -63,9 +38,12 @@ $ echo "ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN" >> ~/.conf
 
+* The output-redirection operator @>@ in the first command will cause the target file @~/.config/arvados/settings.conf@ to be created anew, wiping out the content of any existing file at that path. +* The @>>@ operator in the second command appends to the target file. + h2. .bashrc -Alternately, you may add the declarations of @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ to the @~/.bashrc@ file on the system on which you intend to use the Arvados client. If you have already put the variables into the environment with instructions above, you can use these commands to append the environment variables to your @~/.bashrc@: +Alternately, you may add the definitions of @ARVADOS_API_HOST@ and @ARVADOS_API_TOKEN@ to the @~/.bashrc@ file on the system where you intend to use the Arvados client. If you have already put the variables into the environment following the instructions above, you can use the commands below to append to your @~/.bashrc@, which tells Bash to export them as environment variables in newly-started interactive shell sessions:
$ echo "export ARVADOS_API_HOST=$ARVADOS_API_HOST" >> ~/.bashrc