Install this package:
emerge -a dev-vcs/git-credential-with-kwallet
If the package is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask dev-vcs/git-credential-with-kwallet
Or alternatively:
emerge --autounmask-write -a dev-vcs/git-credential-with-kwallet