Running token authenticated git commands within a build step

I have a build process that

  • Pulls code (VCS - Git with un/PAT token auth)
  • Runs tests
  • Updates version and changelog and creates (git) tag
  • Publishes new package to package management
  • Pushes updated files and tag to repository (not working)

Everything is good until we go to pushing the changes. I've installed the PAT token credentials on each of our build agents, and the commands work fine directly from the agent machines themselves. But, when the command runs in TeamCity from a build step it just spins, going nowhere. Am I missing something? Should these creds be installed on the TC server itself for this to work?

Note: the build is set to 'always checkout files on agent' and the VCS config is to 'Do not use mirrors'

1 comment

Can you share the excerpt of build script that is not working, and a build log for any problematic build? You may do so in a secure manner via site - please share the upload ID with me when done so I could access the data.

At a glance, this could happen if any of executed commands are running in interactive mode and are awaiting for user input - could this be the case?

Please sign in to leave a comment.