Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitVersion init settings for private github repos with Appveyor #869

Closed
bigjonroberts opened this issue May 19, 2016 · 4 comments · Fixed by #927
Closed

GitVersion init settings for private github repos with Appveyor #869

bigjonroberts opened this issue May 19, 2016 · 4 comments · Fixed by #927

Comments

@bigjonroberts
Copy link

bigjonroberts commented May 19, 2016

Appveyor uses ssh to clone/fetch a repo as you can configure the public key for this operation in Github.

I wanted to enable Gitversion for my private repo on Appveyor. The suggested workarounds to use https and set environment variables weren't working for me as appveyor does not include encrypted environment variables (GITVERSION_REMOTE_PASSWORD) on PR builds for security reasons.

@JakeGinnivan suggested that I change the process to avoid the extra fetch instead of trying to use ssl.

This worked out and here's what I ended up with in my appveyor.yml:

before_build:
  - nuget restore
  - ps: gitversion $env:APPVEYOR_BUILD_FOLDER /l console /output buildserver /updateAssemblyInfo /nofetch /b $env:APPVEYOR_REPO_BRANCH

I think it would be a great idea to add a prompt in gitversion init asking if your repo is private and configuring appveyor output to match this when a repo is private.

I'll leave this open several days to see what people think. If it seems a good idea, I should be able to make the changes this weekend and open a PR.

@gep13
Copy link
Member

gep13 commented May 19, 2016

@bigjonroberts this sounds like a good idea to me!

@JakeGinnivan
Copy link
Contributor

Ditto, things like this are handy. Also would be good to add some info about using it with a private AppVeyor repo to the docs.

@bigjonroberts
Copy link
Author

Looks like this is the place to make these code changes, correct?

https://github.com/GitTools/GitVersion/blob/master/src/GitVersionCore/Configuration/Init/BuildServer/AppVeyorSetup.cs

@bigjonroberts
Copy link
Author

bigjonroberts commented Jul 7, 2016

Hmmm..... This took me much longer than a few days to circle back around... My magic 🎱 wasn't in fully working order back in May.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants