Cannot create VCS Root using Bitbucket cloud - 2026.1.2
We updated to 2026.1.2 (and subsequently installed Java 21) in order to use the Oauth & bitbucket cloud VCS roots without specifying username / password.
We have old VCS roots still set up that are working fine (when not getting brownouts). However the new ones fail to set up, we cannot get past ‘test connection’ and have the error in our stack trace of ‘The batch file cannot be found.’
The old VCS roots are still working, so the git batch files are created and torn down as expected. - We're unable to set up replacement roots as a result of this.
Please sign in to leave a comment.
Additional Investigation
We have spent considerable time investigating this before raising the ticket and have been able to narrow the issue down.
Environment
Initial issue
During the initial Bitbucket Cloud OAuth setup we discovered that the callback URL presented by TeamCity did not match the callback URL actually used during the OAuth flow.
TeamCity instructed us to register:
However, during authentication TeamCity redirected to:
Registering the
/accessToken.htmlendpoint resolved the OAuth callback issue and repository browsing began working correctly.Current issue
The Bitbucket Cloud connection authenticates successfully.
We can:
However, every newly-created VCS Root fails on Test Connection with:
followed by:
Things we have verified
We have ruled out the following:
fortius-liam@in the URL.C:\TeamCity.pass*.batandcred*.batfiles are opened successfully bycmd.exeandsh.exe.Important observation
Our existing (legacy) Bitbucket VCS Roots continue to work correctly.
Only newly-created Bitbucket Cloud OAuth / Refreshable Access Token VCS Roots fail.
Because the existing VCS Roots still perform Git operations successfully, this does not appear to be a general TeamCity Git or temporary-file issue.
We suspect this may be a regression in the Bitbucket Cloud OAuth / Refreshable Access Token implementation in TeamCity 2026.1.2.
Hi,
Could you please help us with the following?
teamcity-vcs.logandteamcity-server.logaround the time you click Test connection on the failing VCS root.Please share the configuration of:
Screenshots or an XML export are both fine. We'd like to compare the repository URL, authentication method, connection settings, and any other differences.
Large files can be uploaded via https://uploads.jetbrains.com/. Please let us know the exact id after the upload.
Uploaded at 2026_07_23_NKJTE4bvbKXWmAokq9xts
The existing VCS roots that work are using the username / password method of connecting.
The ones that arent working are attempting to use the Oauth VCS Root.- The error occurs for every repo we try to set up using this configuration.
Note: We didnt create the new VCS's fully as ‘test connection’ didnt work - The timestamps for us testing connections will be around 1pm UTC+1 on the 22nd of July.
Thanks!
Hi,
Thank you for the additional information.
Unfortunately, I'm unable to access the files you mentioned( 2026_07_23_NKJTE4bvbKXWmAokq9xts) from my side.
Could you please re-upload the server logs and share the upload ID again?
• teamcity-vcs.log
• teamcity-server.log
uploaded new versions after making a new VSC connection and clicking ‘test’ a couple of times so the logs would be fresh
Upload id: 2026_07_24_2BNCHGFdux7Hc5tK9UVWmM (files: teamcity-vcs.log, teamcity-server.log)
Thanks for providing the logs.
After reviewing them, I found two separate issues.
1. Test Connection for the new OAuth VCS Root
From the logs, all three failed Test Connection attempts were performed against a VCS root that had not yet been saved:
At the same time, TeamCity reports that the OAuth token cannot be found in TeamCity storage, followed by the secondary error:
Based on the logs alone, it's not yet clear whether these symptoms are directly related or whether they indicate a separate issue.
As a first step, could you please try the following?
Please let us know whether the test succeeds after the VCS root has been saved. This will help us determine whether the issue is limited to testing an unsaved VCS root or whether further investigation is needed.
2. Existing Bitbucket VCS Roots
The logs also show a separate issue affecting your existing Bitbucket VCS roots.
There are a lot of entries similar to:
for VCS roots using URLs such as:
This indicates that these VCS roots are still authenticating with Bitbucket App Passwords, which Bitbucket Cloud has now deprecated. As a result, Bitbucket returns HTTP 410 when TeamCity attempts to access those repositories.
If these VCS roots are still in use, they will need to be migrated to a supported authentication method, such as Bitbucket API Tokens or OAuth.
For Bitbucket API Token authentication, Bitbucket recommends using:
x-bitbucket-api-token-authPlease let us know the outcome after testing the saved OAuth VCS root. If the issue persists, we'll continue investigating further.
I have now saved the new VCS root. However I didnt save it because it wasnt working. The same response still occurs.
On the old ones set up with the old style username / passwords. The 410 happens intermittently because of the bitbucket old credential brown outs.
Regarding the existing VCS roots, thank you for confirming that the HTTP 410 errors are due to Bitbucket's App Password brownouts. That makes sense and appears to be a separate issue from the OAuth VCS root problem.
To continue investigating the OAuth issue, could you please provide a fresh set of logs captured while reproducing the problem with the saved VCS root?
Specifically, we'd appreciate:
• teamcity-server.log
• teamcity-vcs.log
Please reproduce the issue by opening the saved OAuth VCS root and clicking Test Connection, then let us know the approximate timestamp (including your timezone) when you performed the test.
Could you please upload the new logs and share the upload ID again?