It’s assumed a Python environment with pip is installed.
Clone the repository:
$ git clone https://github.com/Yubico/yubikey-manager.git $ cd yubikey-manager
Install in editable mode with pip:
$ pip install -e .
Show available commands:
$ ykman --help
Show information about inserted YubiKey:
$ ykman info
Run ykman in DEBUG mode:
$ ykman --log-level DEBUG info
To uninstall, run:
$ pip uninstall yubikey-manager
This project uses Flake8 for code style and Bandit for security linting. These are invoked with a pre-commit hook. To use these:
$ pip install pre-commit flake8 bandit $ pre-commit install
First, install tox if you haven’t already:
$ pip install tox
To run unit tests:
$ tox
To run with multiple Python versions (requires all those interpreters to be installed):
$ tox -e py27,py38
Warning
|
ONLY run these on dedicated developer keys, as it will permanently delete data on the device(s)! |
To run integration tests, indicate the serial numbers (given by ykman list
) of the YubiKeys to test with:
$ DESTRUCTIVE_TEST_YUBIKEY_SERIALS=123456,234567 tox -e integration-test
The integration test suite will automatically identify which test cases can be run with the available YubiKeys, and run those test cases for each eligible YubiKey. See integration-tests.adoc for a deep dive into how this works.
For third-party packaging, use the source releases and signatures available here.