mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-02 03:14:26 +02:00
PlatformIO Auth Token command
This commit is contained in:
@@ -11,6 +11,7 @@ PlatformIO 3.0
|
|||||||
Your devices are always with you!
|
Your devices are always with you!
|
||||||
* `PIO Account <http://docs.platformio.org/en/latest/userguide/account/index.html>`__
|
* `PIO Account <http://docs.platformio.org/en/latest/userguide/account/index.html>`__
|
||||||
for extra professional features from `PlatformIO Plus <https://pioplus.com>`__
|
for extra professional features from `PlatformIO Plus <https://pioplus.com>`__
|
||||||
|
and ``PLATFORMIO_AUTH_TOKEN`` environment variable for CI systems
|
||||||
* Inject system environment variables to configuration settings in
|
* Inject system environment variables to configuration settings in
|
||||||
`Project Configuration File "platformio.ini" <http://docs.platformio.org/en/stable/projectconf.html>`__
|
`Project Configuration File "platformio.ini" <http://docs.platformio.org/en/stable/projectconf.html>`__
|
||||||
(`issue #792 <https://github.com/platformio/platformio/issues/792>`_)
|
(`issue #792 <https://github.com/platformio/platformio/issues/792>`_)
|
||||||
|
@@ -21,6 +21,19 @@ will behave on a computer.
|
|||||||
*PlatformIO* handles variables which start with ``PLATFORMIO_`` prefix. They
|
*PlatformIO* handles variables which start with ``PLATFORMIO_`` prefix. They
|
||||||
have the **HIGHEST PRIORITY**.
|
have the **HIGHEST PRIORITY**.
|
||||||
|
|
||||||
|
How to set environment variable?
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Windows
|
||||||
|
set VARIABLE_NAME=VALUE
|
||||||
|
|
||||||
|
# Unix (bash, zsh)
|
||||||
|
export VARIABLE_NAME=VALUE
|
||||||
|
|
||||||
|
# Unix (fish)
|
||||||
|
set -x VARIABLE_NAME VALUE
|
||||||
|
|
||||||
.. contents::
|
.. contents::
|
||||||
|
|
||||||
General
|
General
|
||||||
@@ -38,6 +51,15 @@ PlatformIO uses it to disable prompts and progress bars. In other words,
|
|||||||
``CI=true`` automatically setup :envvar:`PLATFORMIO_DISABLE_PROGRESSBAR` to
|
``CI=true`` automatically setup :envvar:`PLATFORMIO_DISABLE_PROGRESSBAR` to
|
||||||
``true``.
|
``true``.
|
||||||
|
|
||||||
|
.. envvar:: PLATFORMIO_AUTH_TOKEN
|
||||||
|
|
||||||
|
Allows to specify Personal Authentication Token that could be used for
|
||||||
|
automatic login in to :ref:`cmd_account`. It is very useful for :ref:`ci`
|
||||||
|
systems and :ref:`pio_remote` operations where you are not able manually authorize.
|
||||||
|
|
||||||
|
You can get own Personal Authentication Token using :ref:`cmd_account_token`
|
||||||
|
command.
|
||||||
|
|
||||||
.. envvar:: PLATFORMIO_FORCE_COLOR
|
.. envvar:: PLATFORMIO_FORCE_COLOR
|
||||||
|
|
||||||
Force to output color ANSI-codes even if the output is a ``pipe`` (not a ``tty``).
|
Force to output color ANSI-codes even if the output is a ``pipe`` (not a ``tty``).
|
||||||
@@ -165,7 +187,6 @@ Allows to override setting :ref:`setting_enable_telemetry`.
|
|||||||
|
|
||||||
Allows to override setting :ref:`setting_force_verbose`.
|
Allows to override setting :ref:`setting_force_verbose`.
|
||||||
|
|
||||||
|
|
||||||
.. envvar:: PLATFORMIO_SETTING_ENABLE_SSL
|
.. envvar:: PLATFORMIO_SETTING_ENABLE_SSL
|
||||||
|
|
||||||
Allows to override setting :ref:`setting_enable_ssl`.
|
Allows to override setting :ref:`setting_enable_ssl`.
|
||||||
|
@@ -27,7 +27,9 @@ Usage
|
|||||||
Description
|
Description
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
Log in to :ref:`cmd_account`.
|
Log in to :ref:`cmd_account`. If you are not able to provide authentication
|
||||||
|
credentials manually you can use :envvar:`PLATFORMIO_AUTH_TOKEN`. This is
|
||||||
|
very useful for :ref:`ci` systems and :ref:`pio_remote` operations .
|
||||||
|
|
||||||
Options
|
Options
|
||||||
~~~~~~~
|
~~~~~~~
|
||||||
|
44
docs/userguide/account/cmd_token.rst
Normal file
44
docs/userguide/account/cmd_token.rst
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
.. Copyright 2014-present PlatformIO <contact@platformio.org>
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
.. _cmd_account_token:
|
||||||
|
|
||||||
|
platformio account token
|
||||||
|
===========================
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
platformio account token
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Get or regenerate Personal Authentication Token. It is very useful for :ref:`ci`
|
||||||
|
systems, :ref:`pio_remote` operations where you are not able manually authorize.
|
||||||
|
|
||||||
|
PlatformIO handles Personal Authentication Token from environment variable
|
||||||
|
:envvar:`PLATFORMIO_AUTH_TOKEN`.
|
||||||
|
|
||||||
|
Options
|
||||||
|
~~~~~~~
|
||||||
|
|
||||||
|
.. program:: platformio account token
|
||||||
|
|
||||||
|
.. option::
|
||||||
|
--regenerate
|
||||||
|
|
||||||
|
If this option is specified a new authentication token will be generated.
|
@@ -38,3 +38,4 @@ To print all available commands and options use:
|
|||||||
cmd_logout
|
cmd_logout
|
||||||
cmd_password
|
cmd_password
|
||||||
cmd_register
|
cmd_register
|
||||||
|
cmd_token
|
||||||
|
@@ -49,6 +49,12 @@ def account_password():
|
|||||||
pioplus_call(sys.argv[1:])
|
pioplus_call(sys.argv[1:])
|
||||||
|
|
||||||
|
|
||||||
|
@cli.command("token", short_help="Get or regenerate Authentication Token")
|
||||||
|
@click.option("--regenerate", is_flag=True)
|
||||||
|
def account_token(**kwargs):
|
||||||
|
pioplus_call(sys.argv[1:])
|
||||||
|
|
||||||
|
|
||||||
@cli.command("forgot", short_help="Forgot password")
|
@cli.command("forgot", short_help="Forgot password")
|
||||||
@click.option("-u", "--username")
|
@click.option("-u", "--username")
|
||||||
def account_forgot(**kwargs):
|
def account_forgot(**kwargs):
|
||||||
|
Reference in New Issue
Block a user