Issue with Bitbucket app password


Hello everyone,

We're using TeamCity Professional 2021.2 (build 99542) and we have some repos on bitbucket that i'm accessing through HTTPS. So far we've used account passwords and i'm trying to switch to bitbucket app passwords.

I've created an app password with all possible permissions (for testing purposes) and i can successfully use it from the command line to clone, pull, push, etc.

When i try to use it from the Teamcity project vcs root i keep getting the following error when i click on the "test connection" button: 

Failed for the root '"<project name>" {instance id=37, parent internal id=14, 
parent id=<parent-project-id>, description:
git-upload-pack not permitted on '<my-username>/<my-repo>.git/'

I'm not really sure if i'm missing something obvious here or if it's a different issue, i'm not familiar with jgit exceptions and this app password should have all permissions active. From the bitbucket docs an app password should work exactly like the account password (and that's also what i'm experiencing from the command line).

Any idea?




TeamCity server's git client returns the git-upload-pack not permitted error when it gets the 403 response from the VCS server. Have you tried cloning the repo in question manually onto the machine running TeamCity using the same username and password?



Hi Anatoly, thanks for your answer.

Yes, using the app password I can clone the repo from the TeamCity server and from the agent as well from the command line.


I've checked my test TeamCity server with HTTPS and the app password and it worked. Please check the output of this command on the TeamCity server.

curl -i -u "<your-username>:<your-app-password>" "<your-organization>/<your-repo>.git"

You can also look into the teamcity-vcs.log file around the time you test the connection and look for a line like this and the errors below it.

Running test connection for "jetbrains.git" { ... , description: "<your-org>/<your-repo> ...}

Ok, from the teamcity-vcs.log I've noticed that the Teamcity project configuration was still trying to access the repo using my email as username. It has always worked before with my regular account password but it doesn't if I want to use the app password. Now that I've switched to using the actual username everything works as expected.

Thank you Anatoly and sorry for the waste of time.


Please sign in to leave a comment.