Share_Improve
Share_Improve

Reputation: 447

Teamcity VCS error while fetching from git repo

I am getting this error when doing a test connection against my git repository from TeamCity Enterprise 9.1.3 . Can anybody explain this error more closely?

Test connection failed in List remote refs failed: org.eclipse.jgit.errors.TransportException: https://git_repo_url: git-upload-pack not permitted

Upvotes: 4

Views: 4313

Answers (3)

Pranesh Sathyanarayan
Pranesh Sathyanarayan

Reputation: 65

For bitbucket, you would just create an app password to fix this issue.

https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/#Create-an-app-password

the username should not be in email format, bitbucket will have a username assigned when you would have created the account.

you will also see errors such as unauthorized when directly using the https username and password login.

bitbucket has enforced this Mar 1 onwards, as read at this article deprecating-atlassian-account-password-for-bitbucket-api-and-git-activity

Upvotes: 0

Rory
Rory

Reputation: 41897

I also had this problem last week. Github disabled username/password auth on 13 August 2021, causing our TeamCity authentication to break with the OP's error.

Solution was to

  • log in to GitHub via the browser, using the username we use within TeamCity
  • Go to https://github.com/settings/tokens and generate a new access token. For us full access to 'repo' but no other rights seems to work. Give it whatever expiry date fits your security requirements.
  • Update TeamCity VCS settings to use that access token as the 'password', keeping the 'username' as normal.

Upvotes: 5

Samt
Samt

Reputation: 204

I'm very glad and excited to share my experience.

Test connection failed with exactly correct password/acess token.

Teamcity VCS

Suddenly, I checked gitconfig, git config --global --get credential.helper, I found there is

[credential]
    helper = store

I solved by :

git config --global --unset credential.helper

After dinner, Teamcity VCS works again. Teamcity VCS

Upvotes: 2

Related Questions