Kubuntu – Reset Git Saved Credentials

Understood. It sounds like Kubuntu, with its KDE environment, is using its own keychain or wallet to manage your credentials, overriding the default Git settings. The command git config --global --unset credential.helper is a good first step, but it doesn’t clear the data that’s already been stored. To wipe the slate clean, you’ll need to go directly to the source.

The most common credential manager on Kubuntu is KWallet. You can use a command-line tool or a graphical interface to manage it.

Method 1: Command Line (kwalletcli)

You can use the kwalletcli tool to interact with your KWallet from the terminal. If you don’t have it, you can install it:

sudo apt install kwalletcli

Once installed, you can try to list and remove the specific Git entry. This is a bit like playing with the high-stakes cards, as you need to know the right “folder” and “key.” The most likely place for Git credentials is in the “Git Credentials” folder.

To list your credentials, you can try something like this:

kwalletcli --list-entries "Git Credentials"

This might show you a list of your stored usernames.

To remove a specific entry, you would use a command similar to this, replacing username@host with the actual credential you want to delete:

kwalletcli --remove "Git Credentials" "username@host"

Method 2: Graphical Interface (KDE Wallet Manager)

For a more visual approach, you can use the KDE Wallet Manager GUI. This is a straightforward way to see and manage all your stored passwords, including those from Git.

  1. Open the Application Launcher and search for “KDE Wallet Manager” or “kwalletmanager5”.
  2. Once open, you’ll see a list of your wallets. Click on the one that’s active (usually kdewallet).
  3. In the left pane, you’ll see a list of folders. Look for one named “Git Credentials” or similar.
  4. Expand the folder, and you will see your stored Git usernames. Right-click the one you want to remove and select “Delete”.

After you’ve removed the credentials, the next time you perform a remote Git operation, the system won’t find the old credentials and will prompt you to enter a new username and password. This will give you a fresh start, just like walking into a new hand.