I'm new to using Gitlab. My workplace has recently moved from on-prem Git to a cloud-based Gitlab host. I used ssh authentication in the past with our on-prem so never had to deal with credentials hanging around (I'm using Linux) in .git/config or ~/.gitconfig.
If I let git manage my credentials/tokens, with whatever defaults it uses, those creds/tokens end up stored in plaintext in my home directory under ~/.git-credentials or in the .git/config file, which is problematic for various reasons.
I poked around and found Git Credential Manager Core but after getting it installed, as shown in the README, I'm not exactly sure it's working correctly, or I'm misunderstanding how to use it. I ran these commands to get it setup:
dpkg -i gcm-linux_amd64.2.0.785.debgit-credential-manager-core configuregit config --global credential.credentialStore gpgpass init <gpg-id>
I tried cloning a cloud-based repo using a personal access token, but when I clone it, gpg prompts me for my passphrase, but the token ends up in the .git/config file anyway.
$ git clone https://user-test-token:glpat-w1...xp@gitlabhost.com/my.username/my-repo.git
$ cat .git/config
...
[remote "origin"]
url = https://user-test-token:glpat-w1...xp@gitlabhost.com/my.username/my-repo.git
...
What am I doing wrong?