docs: Add git-credential-libsecret as secure credential helper option

- Add Option A (simple store) and Option B (libsecret) for credential helpers
- Recommend libsecret for secure storage in GNOME Keyring/KDE Wallet
- Add installation and configuration instructions for libsecret
- Clarify that Access Token should be used as password, not FAS password
- Add link to official Git credentials documentation
This commit is contained in:
Ryan Lerch 2025-12-16 17:53:51 +10:00
commit b295a2c9fc

View file

@ -79,23 +79,60 @@ CAUTION: This is not the same as your Fedora Account password (which is not used
Username for 'https://forge.fedoraproject.org': your_username
Password for 'https://your_username@forge.fedoraproject.org': <paste_your_access_token_here>
----
+
[NOTE]
====
When you type or paste your Access Token, it will likely not be
displayed on the screen for security reasons.
====
. To avoid entering your Access Token every time you interact with the
repository, you can use a Git credential helper.
+
=== 3. Set up a credential helper
To avoid entering your Access Token every time you interact with the
repository, you can use a Git credential helper:
==== Option A: Simple Store (Less Secure)
The simplest option stores your credentials in a plain-text file:
----
git config --global credential.helper store
----
+
The first time you clone or push, you'll be prompted for your username and
Access Token. Git will then store it in a plain-text file
(`~/.git-credentials`)
Password (Access Token). Git will then store it in a plain-text file (`~/.git-credentials`).
CAUTION: This method stores your Access Token in plain text on disk, which may
be a security concern on shared or less secure systems.
==== Option B: Using libsecret (Recommended)
For a more secure approach, you can use `git-credential-libsecret`, which stores
your credentials in your desktop environment's secure keyring (such as GNOME
Keyring or KDE Wallet).
First, install the credential helper:
----
sudo dnf install git-credential-libsecret
----
Then configure Git to use it:
----
git config --global credential.helper libsecret
----
During your next Git operation, a dialog will appear asking for your username
and password. Enter your Fedora Accounts username and your Fedora Forge Access
Token as the password.
CAUTION: Do not use your Fedora Account (FAS) password. Use the Access Token
you generated in Fedora Forge.
libsecret will then securely store your credentials in the GNOME Keyring, KDE
Wallet, or whichever secret storage system your desktop environment uses.
[NOTE]
====
For more information about Git credential helpers and other available options,
see the official Git documentation: https://git-scm.com/docs/gitcredentials
====
== Generating an Access Token in Fedora Forge