I have a script that runs git remote commands and require user/password credential, because the script runs by teamcity I was wondering if there is a way for teamcity to pass these credential to my script?
By design, TeamCity resists making usernames/passwords available to build steps. This is not to say that you couldn't make it work that way, but be aware of the reason it does it.  If anyone should be able to configure build jobs but shouldn't be able to see the password in question, you'd have a security problem.
The best solution in my opinion is to use SSH when possible.  TeamCity will be happy to run an ssh-agent while your build steps execute, configured with the private key (hence, the identity) of your choosing.  Just being able to configure a build does not give a user the ability to see the private key (or any other sensitive credential) in this scenario, even if they code cleverly and maliciously.
Of course this isn't always an option. But for basic git access it usually is, and you may want to consider it.
run a script using teamcity that require credentials