Why do I need to verify twice when enabling lfs?

my gitlab version:15.8
object store use minio

i need verify twice if repository enable lfs

Looks like git CLI uses a different authentication logic than git lfs CLI (which is invoked as second operation in the background when LFS is enabled). Found this answer: azure devops - Does Git LFS use different authentication logic to Git client? - Stack Overflow

Configuring a Git credential helper should help solve this problem, i.e. that Git asks for the password only once and then puts it into the credential helper where it is encrypted at rest (macOS keychain for example). Git - Credential Storage