Q:

how to get grunt to input git/bitbucket credentials on push to remote

I am creating a build script for a project using Grunt and I want to commit->tag->push to a remote server, but I do not know how to enter credentials for Bitbucket when they are asked for during the git push.  The docs for grunt-git on https://www.npmjs.org/package/grunt-git do not seem to address this issue.  The credentials (just a password) would be read from a config file stored elsewhere and then, ideally, given when asked for. 
I was thinking perhaps I could use grunt-shell to address this, but even then I am not sure.  Upon further thought, it seems that maybe I should just use grunt to do the git commit and git tag commands, then leave it to the CI server software (in this case Jenkins) to handle the credentials and pushing to remote. 
So my question is really twofold:
1) Is it possible to give the credentials when they are requested in this case?  if so, how?  
2) Would it be a better solution (better practice/easier) to simply leave this responsibility to the CI server (Jenkins)? 
Thanks. 

A:

1) Is it possible to give the credentials when they are requested in
  this case?  if so, how? 

If you add your SSH key to Bitbucket and given that when you generated the SSH key you didn't enter a password, then you won't be prompted for any credentials when you try to push. 

2) Would it be a better solution (better practice/easier) to simply
  leave this responsibility to the CI server (Jenkins)? 

Jenkins uses its own SSH key, and if it's passwordless it can run a build that pushes to any host in which you imported the Jenkins key without credentials. 
It's usually the job of the CI server to handle this, not the build tool.   But if all you need at the moment is to bypass the password on your local machine, generate a passwordless SSH key, or try something like SSH Agent.