4

We're using Teamcity 8.0.1 (build 27435). Having this exact same problem. Trying to connect to a bitbucket repo and getting the following exception intermittently:

Failed to collect changes, error: List remote refs failed:
org.eclipse.jgit.errors.TransportException: 
https://username@bitbucket.org/myproject/project.git: -1 null

Behind a proxy server and I have added -Dhttps.proxyHost=XXX -Dhttps.proxyPort=1234 to the TEAMCITY_SERVER_OPTS environment variable. That didn't work. There was mention of trying to upgrade to Java7 on another forum but that also didn't help.

Unfortunately, we're not able to use SSH to bitbucket because of the company network rules.

Anyone solved this problem or have suggestions? Thanks for the help!

mawaldne
  • 3,919
  • 6
  • 31
  • 37
  • In the above links, the solution was to switch to SSH. Teamcity doesn't seem to have a problem. Sadly, I can't do that on my company network. – mawaldne Jul 18 '13 at 15:26

1 Answers1

2

Im not sure if there a bug in Teamcity/Jgit, but HTTPS for Bitbucket is not working properly. The solution here was to use SSH, but thats not an option for me.

My solution for now is to clone the repo locally (git clone --mirror) and update it periodically in bash (git remote update). Then just point TeamCity to that local .git folder.

mawaldne
  • 3,919
  • 6
  • 31
  • 37
  • I know this seems ludicrous but I was trying to paste in my password (yes obviously making sure not to includes spaces) and it kept coming back with connection failed. I manually typed in the pass and it reconnected immediately. Just in case something else to try. – macm May 16 '16 at 19:43