Skip to content

Commit efd2c17

Browse files
crobinsocrazyscientist
authored andcommitted
man: Add section about bugzillarc
Fixes: #175 Signed-off-by: Cole Robinson <[email protected]>
1 parent 9e9d39b commit efd2c17

1 file changed

Lines changed: 44 additions & 15 deletions

File tree

man/bugzilla.rst

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -791,6 +791,46 @@ List the versions for the given product
791791
Only show active components. Combine with --components*
792792

793793

794+
``bugzillarc`` CONFIG FILE
795+
==========================
796+
797+
Both ``bugzilla`` and the python-bugzilla library will read
798+
a ``bugzillarc`` config file if it is present in the following
799+
locations:
800+
801+
- /etc/bugzillarc
802+
- ~/.bugzillarc
803+
- ~/.config/python-bugzilla/bugzillarc
804+
805+
The contents of the files are processed and merged together
806+
in the order they are listed above.
807+
808+
The main usage for ``bugzillarc`` is to store API keys for your
809+
bugzilla URLs:
810+
811+
::
812+
813+
[bugzilla.example.com]
814+
api_key=INSERT-YOUR-API-KEY-HERE
815+
816+
[bugzilla.redhat.com]
817+
api_key=MY-REDHAT-API-KEY-BLAH
818+
819+
820+
The sections must be hostnames. Other values that can be
821+
set per hostname section are
822+
823+
- ``user``: default auth username
824+
- ``password``: default auth password
825+
- ``cert``: default client side certificate
826+
827+
828+
A ``[DEFAULTS]`` section is also accepted, which takes the following
829+
values:
830+
831+
- ``url``: default bugzilla URL
832+
833+
794834
AUTHENTICATION CACHE AND API KEYS
795835
=================================
796836

@@ -802,28 +842,17 @@ active login.
802842
If you are connecting to a bugzilla 5.0 or later instance, the best
803843
option is to use bugzilla API keys. From the bugzilla web UI, log in,
804844
navigate to Preferences->API Keys, and generate a key (it will be a long
805-
string of characters and numbers). Then create a
806-
~/.config/python-bugzilla/bugzillarc like this:
807-
808-
::
809-
810-
$ cat ~/.config/python-bugzilla/bugzillarc
811-
812-
[bugzilla.example.com]
813-
api_key=YOUR_API_KEY
814-
815-
Replace 'bugzilla.example.com' with your bugzilla host name, and
816-
YOUR_API_KEY with the generated API Key from the Web UI.
845+
string of characters and numbers).
817846

818-
Alternatively, you can use 'bugzilla login --api-key', which will ask
819-
for the API key, and save it to bugzillarc for you.
847+
Then use 'bugzilla --bugzilla URL login --api-key', which will ask
848+
for the API key, and save it to ``bugzillarc`` for you.
820849

821850
For older bugzilla instances, you will need to cache a login token
822851
with the "login" subcommand or the "--login" argument.
823852

824853
Additionally, the --no-cache-credentials option will tell the bugzilla
825854
tool to *not* save or use any authentication cache, including the
826-
bugzillarc file.
855+
``bugzillarc`` file.
827856

828857

829858
EXAMPLES

0 commit comments

Comments
 (0)