Not able to change Git account

We aren’t able to change the git account on our servers. It keeps asking for the password of the same user. Please find the screenshot attached for reference.

The username used for connecting to remote repositories has nothing to do with is used when creating or rebasing commits as author or committer data, respectively.

The username for HTTPS or SSH auth is most likely either set in the remote repository config, or a cached credential.

How do we change the cached credential or where is the remote repository config located?

For remote repository config see Git - Working with Remotes.

How cached credentials (if any) are handled depends on your system, I can’t help you there. Git’s built-in credential cache would usually have username and password, so it’s unlikely it’s that.