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.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

18 Aug, 2018 12:13 AM
17 Aug, 2018 09:45 PM
17 Aug, 2018 06:02 PM
17 Aug, 2018 04:26 PM
17 Aug, 2018 04:04 PM