Getting GitVersion to work with private BitBucket/GitHub repositories

sebastian's Avatar

sebastian

31 Mar, 2015 02:12 PM

GitVersion doesn't support SSH (yet) so you may have noticed that if you use private BitBucket/GitHub repos then GitVersion fails. Yup, that's right, the remote that AppVeyor sets up uses SSH.

To get GitVersion working you can switch the remote to an HTTPS url before running it (credit to Feodor for the idea).

The script to include under the 'install' of your 'appveyor.yml':

install:   
  - git remote set-url origin https://bitbucket.org/myteam/myrepository.git
  - GitVersion

If you don't use appveyor.yml you can copy the two commands to your install script under 'Environment' settings.

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.

  1. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:55 AM.

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

Keyboard shortcuts

Generic

? 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

Recent Discussions

23 Oct, 2018 10:12 PM
23 Oct, 2018 08:45 PM
23 Oct, 2018 07:48 PM
23 Oct, 2018 06:50 PM
23 Oct, 2018 06:06 PM