Git Credential Manager on Arch Linux (Codeberg + VSCode)
Requirements
- Arch Linux with a display manager (SDDM)
- Wayland compositor (niri, Hyprland, etc.)
- Codeberg account with an access token
1. Install GCM
yay -S git-credential-manager2. Run GCM setup
git-credential-manager configure3. Install gnome-keyring
sudo pacman -S gnome-keyring libsecret4. Enable keyring daemon via systemd
systemctl --user enable --now gnome-keyring-daemon.socket5. Configure PAM for auto-unlock on login
Check /etc/pam.d/sddm-autologin — it should already contain these lines (added by gnome-keyring package). If not, add them:
-auth optional pam_gnome_keyring.so-session optional pam_gnome_keyring.so auto_start6. Configure Git
git config --global credential.credentialStore secretservicegit config --global credential.guiPrompt false # terminal prompt (no GUI)git config --global credential.https://codeberg.org.provider genericgit config --global credential.https://codeberg.org.username YOUR_CODEBERG_USERNAMEFinal ~/.gitconfig credential section
[credential] helper = helper = /usr/bin/git-credential-manager credentialStore = secretservice guiPrompt = false
[credential "https://dev.azure.com"] useHttpPath = true
[credential "https://codeberg.org"] provider = generic username = YOUR_CODEBERG_USERNAME7. Reboot
rebootOn first login after reboot, you will be prompted to set a password for the keyring. Set one — it unlocks automatically on subsequent logins via PAM.
8. Test
Clone a Codeberg repo. When prompted, enter:
- Username: your Codeberg username
- Password: a Codeberg access token (Settings → Applications → Generate Token, with
repositoryscope)
On the second operation, no prompt should appear — credentials are stored in the keyring.
Verify stored credentials
secret-tool search server codeberg.org