Skip to content

Commit a8e7060

Browse files
committed
Update cli-usage.rst
Hi, I wanted to use an env var for the token. I spend some time to figure out that I needed to escape '%' because of configparser. Therefore, I made this PR to improve the current documentation hoping others will spend much less time than me. Kind regards,
1 parent a00ec87 commit a8e7060

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/cli-usage.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,25 @@ In `/path/to/helper.sh`:
170170
171171
#!/bin/bash
172172
pass show path/to/password | head -n 1
173+
174+
Example for an `environnement variable`:
175+
176+
.. code-block:: ini
177+
178+
[global]
179+
default = somewhere
180+
ssl_verify = true
181+
timeout = 5
182+
183+
[somewhere]
184+
url = http://somewhe.re
185+
private_token = helper: printf -- '%%s' ${GITLAB_TOKEN}
186+
timeout = 1
187+
188+
.. warning::
189+
190+
* ``printf`` is the executable provided by coreutils package (on a debian based distribution).
191+
* ``%`` must be escaped using an other `%` (in order to allow `configparser` load configuration properly.
173192

174193
CLI
175194
===

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy