Is it possible to connect to BitBucket repos over HTTPS instead of SSH?

sebastian's Avatar


30 Mar, 2015 04:53 PM

I'm having trouble trying to run GitVersion for private BitBucket repos because it doesn't support SSH remotes. Is there any way to get Appveyor to revert to using HTTPS and user credentials?

  1. Support Staff 1 Posted by Feodor Fitsner on 30 Mar, 2015 11:28 PM

    Feodor Fitsner's Avatar

    Hi Sebastian,

    I think it's possible. You can add a new project and select "Git" repository. Use https repo URL and credentials to authenticate. Then you should manually configure POST webhook for that BitBucket repo. Take webhook URL from General tab of project settings and replace git with bitBucket.

    Let me know if you have any questions.

  2. 2 Posted by sebastian on 31 Mar, 2015 06:19 AM

    sebastian's Avatar

    Hi mate,

    Not sure if this is related, but I blew away my old project for the repo and created a new one using a vanilla 'Git' repo with HTTPS credentials like you said. Seems to connect fine, but now it's ignoring the AppVeyor.yml that's in the root of the repo.

    Same repo, same commit and same appveyor.yml as the last project - but it's trying to build and run tests from UI settings, regardless of the steps being disabled in the appveyor.yml.

    Again, a private repo so if you give me your email I can make you a collaborator so you can check it out.

  3. 3 Posted by sebastian on 31 Mar, 2015 10:34 AM

    sebastian's Avatar

    Just saw this issue here which is the same:

    Technical reasons aside, this seems like an odd limitation to have. I'd like to have some consistency with the way that I use AppVeyor and to me, the YML file is it. I don't really want to be forced to switch between YML and UI based on what kind of git repo I'm connecting to. Just my $0.02.

  4. Support Staff 4 Posted by Feodor Fitsner on 31 Mar, 2015 12:15 PM

    Feodor Fitsner's Avatar

    Yes, there is a limitation right now - using generic Git/Mercurial/SVN provider ignores appveyor.yml. The problem there is Git doesn't provide an easy/reliable way to download a single file (appveyor.yml) from remote repo that must be done before the entire repo is cloned on build worker.

    You can leave SSH and try configuring a different remote in "install" section to make GitVersion work.


  5. 5 Posted by sebastian on 31 Mar, 2015 02:06 PM

    sebastian's Avatar

    Great suggestion!

    Hopefully GitVersion will support SSH soon. Until then, this is the solution for how to get GitVersion working for private BitBucket repos:

    The script I include is under the 'install' of my appveyor.yml:

      - git remote set-url origin

    Then ensure the GITVERSION_REMOTE_USERNAME and GITVERSION_REMOTE_PASSWORD env variables are set in either the appveyor.yml file or the appveyor project configuration.

    Disclaimer It's worth noting that this requires that the repo also support HTTPS... So basically, BitBucket, Stash, GitHub etc. which all offer multiple endpoints for your repos are sweet, but if you're stuck with a repo that can only do SSH then this won't work for you.

  6. Support Staff 6 Posted by Feodor Fitsner on 31 Mar, 2015 02:11 PM

    Feodor Fitsner's Avatar

    Great, thanks for sharing the solution!

  7. sebastian closed this discussion on 25 Jun, 2015 09:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac