You are viewing the documentation of TeamCity 10.x and 2017.x, which is not the most recently released version of TeamCity.
View this page in TeamCity 2018.x documentation or refer to the listing to choose the documentation corresponding to your TeamCity version.

Skip to end of metadata
Go to start of metadata

Commit status publisher is a build feature which allows TeamCity to automatically attach build statuses of your commits in an external system. The feature is implemented as a plugin bundled since TeamCity 10.0; for earlier TeamCity versions the stand-alone plugin is used.

 The supported systems are:

  • JetBrains Upsource
  • GitHub (the build statuses for pull requests are supported as well)
  • GitLab

    Commit Status Publisher settings for GItLab publisher


    If you use a recent version of GitLab (>= 9.0), it is recommended to use the GitLab URL of the following format: http[s]://<hostname>[:<port>]/api/v4 as GitLab will stop supporting the v3 API in GitLab 11. If you have /api/v3 in your current TeamCity configurations, they may stop working with GitLab 11+, so consider changing the server URL to api/v4.

    For older versions of GitLab, use the GitLab URL of the format http[s]://<hostname>[:<port>]/api/v3.
  • TFS/VSTS-hosted Git (since TeamCity 2017.2)


    Personal Access Tokens can be used for authentication. If a VSTS connection is configured, the personal access token can be automatically filled from the project connection.


  • Atlassian Bitbucket Server (formerly Stash) and Atlassian Bitbucket Cloud


    Make sure that the TeamCity server URL is FQDN, e.g. http://myteamcity.domain.com:8111. Short names, e.g. http://myteamcity:8111 are rejected by the Bitbucket API.


    For Bitbucket Cloud team accounts, it is possible to use the team name as the username, and the API key as the password.

  • Gerrit Code Review tool.

To use the tool:

  1. Add the build feature to your build configuration,
  2. Use the default All attached VCS roots option if you want Commit Status Publisher to attempt publishing statuses for commits in all attached VCS roots or select a single repository for publishing build statuses (since TeamCity 2017.1)
  3. select your system as the publisher, and specify its connection details and credentials
  4. Test the connection (since TeamCity 2017.1)
  5. Save your settings.

See the example below to configure sending the status of builds with changes included in your pull request from TeamCity to GitHub.

  1. Configure the branch specification in your VCS Root ensuring that it includes pull requests. Detailed information is available in the Branch specification section of this TeamCity blog post.
  2. Add the build feature:

    - Use the default All attached VCS roots option to publish statuses for commits in all attached VCS roots
    - Select GitHub as the publisher and specify its connection details and credentials and test the connection:

  3. Save your settings.
  4. Commit changes to your source code and create a pull request in GitHub, then run a build with your changes in TeamCity. 

    The Commit Status Publisher will inform you on the status of the build with your pull request changes:  
    1) It will show you whether the check is in progress , whether it failed  or is successful 
    2) hovering over the commit status will display the build summary
    3) clicking the build status sign or the Details link will open the build results page in TeamCity:

    This information is also available on the Commits tab of your pull request details: 

     Similarly to the previous page, clicking the build status icon opens the build results page in the TeamCity web UI: 

  • No labels


  1. Thank you so much for updating this! You don't know how many days it took to figure out where the status are actually placed. I had no idea that it only showed the status in a pull request or the branches view. On that note, is there any way to show the build status in the commit view? Like if I push a commit how can I get the build status, that runs on every commit, to show?

    1. Sean, thank you for the comment. I fixed the page to (hopefully) make it clear TeamCity can attach build statuses of commits in all systems except for GitHub, where only the pull request status can be published. If you want to get the build status on any commit in GitHub, please submit an issue to our tracker 

  2. I'm glad that this plugin is bundled with TeamCity by default. I would like to understand whether it will work when TeamCity is installed on our company's network and is not publicly accessible? Or do I need to expose some proxy? Is there any documentation on how to do it?



  3. Boris, plugin should work fine in this case. If it doesn't,  please file an issue in the tracker and attach teamcity-server.log covering problems to the issue.

  4. Are there any plans to add TFS/VSTS to the list of supported systems?

    1. Hi Yan,

      there are no such plans at the moment, please file a feature request in issue tracker.

  5. If you have multiple build configurations (say, one on Windows and another one on Mac), it looks like whichever one finishes first wins and sets the status of the PR? That's not great ...

  6. Hello,

    looked into sources, and it seems like SSH auth support for bitbucket is missing. Can you please clarify on that?

    Thank you.

    1. Gleb, not sure what you mean. If you think there is an issue with the code, please post it to our tracker noting the code fragments that cause your concern?

      1. It is not about code. This plugin only has login/password auth option to access bitbucket. Our TC is configured to use SSH key to access bitbucket. I cannot reuse it in this plugin. I've seen that other connectors (to some other repository) have this option. Can I use tracker to post this feature request as well?

        1. Gleb, thank you for clarification. Looks like the Bitbucket REST API does not support SSH auth (unlike Git access to Bitbucket repositories), so it cannot be implemented in our plugin.

          1. Julia Alexandrova thank you very much for info. Sad story (smile) 
            Have a nice day!

          2. Julia Alexandrova - For team accounts, BitBucket offers use of API key. The BitBucket REST API does support API key. As a possible alternative, couldn't the plugin offer option to use API key instead of forcing username/password?

            1. Matt Jackman, Thanks for your comment. The plugin supports using team name as the user name and the API key as the password for Bitbucket Cloud team accounts. Team name/API key can also be used as basic HTTP authentication credentials when configuring a VCS Root, or a Bitbucket issue tracker. I'll update documentation accordingly.

              1. Thank you, Julia Alexandrova, for updating doc. We have A LOT of repos, all under the same team. I'd like status for all my build configurations to go update the specified repo. It appears I need to go back to every build configuration and add this build feature, correct? When I try to add build feature to the template, I'm getting this message: "There are no VCS roots configured."

                1. Matt Jackman Julia Alexandrova I have the same problem, that we have a lot of Repos under the same project. I would like to put the auth from the commit status  publisher in the Build Configuration template. Otherwise I have to maintain 80 authentifications for this build feature!! Is there a way how I can set up the  commit status  publisher for all VCS roots? 

                  Many thanks in advance, 


                  1. Matt Jackmanfrancesco, There is a new feature in TeamCity 2017.2, project-wide default build configuration template. You can add the build feature to the template, and once the template is set as the default one for the project, the feature will be added to all its build configurations and those of subprojects. 

                    1. Julia Alexandrova Not sure whether this will solve my requirement. I can add a template project wide with a build feature. But is it possible to add a "commit status publisher" project wide and it will take automatically the respective VCS root? I'm asking because as I mentioned, I have for one project with 80 Repos with 80 different VCS roots. I'm asking because I still have Version 10.0.6. Thanks in advance. Much appreciate!

                      1. Julia Alexandrova thousand thanks for updating Commit Status Publisher site with the information I was looking for. Speechless how fast you've react- much appreciate! 

                        1. francesco, thank for helping me make our documentation better.

  7. It looks like this plugin supports only builds against the pull request branch head and not the results of the merge of that branch. Is that true?

    "I checked the API side. It works for my tests. This could be also a problem is you run the build for refs/pull/*/merge branch. Please use refs/pull/*/head branch"

    1. Rob Fulwell, it seems that you are referencing a different plugin, which is not a part of our bundle.

  8. Has anyone gotten this to work with GitLab?

    I keep getting a "unable to find valid certification path to requested target" error.

    1. Nicola Fera, please submit an issue to our tracker noting the URL and  TeamCity version.

        1. Thanks! Our developers are looking into it, please watch the issue for updates.

  9. Is there any way to use a configuration parameter for the password? It's really tedious to change the value in every single configuration each time we add a new one (because nobody knows what the password actually is so we end up resetting it every time we had a repository to build in teamcity).

    1. Yes! In the password box you can actually enter a parameter reference. I defined a configuration parameter at the root level and then pasted this into the password box %GithubCommitStatusAuthToken% and it works!

  10. Thought i'd mention for anyone that had the same problem as I did - capitalization of repository name is really important! I had capitalized my repository name in TC (when integrating as a bitbucket cloud VCS root), but the BitBucket API to push the build statuses too, requires lowercase. Hope that helps someone.

  11. For Bitbucket Cloud team accounts, it is possible to use the team name as the username, and the API key as the password.


    Bitbucket now uses OAuth2, so the API Keys section has disappeared in the team settings.

    How do we now authenticate this plugin to a Bitbucket Cloud account?

  12. We would like to include `Test failures` instead specifying the build failed has on a pull request in Github. Is there any workaround for this of stuff(using API)? 

  13. Does anyone have this working with GitHub?  I've tried using this with my Personal Access Token and I just keep getting an error message: "Error while retrieving {organisation/repo} repository information: null"