0

I'm trying to include SSL on my gitlab pages site, and it says I need to first install the Pages daemon. However, I'm not sure where to start: is cd /home/git a home directory on my Mac where I'm supposed to have git installed?

When I do git --version it says git version 2.7.4 (Apple Git-66) however I'm not seeing a folder "git" inside my home directory. Any ideas on how I'd get into the /home/git folder?

enter image description here

evan
  • 954
  • 3
  • 18
  • 37
  • are you trying to setup GitLab Pages in your own GitLab instance, right? Which one is it? GitLab CE? Or Enterprise Edition? – Virtua Creative Jul 13 '16 at 01:47
  • @VirtuaCreative yes just my own gitlab instance. a simple static site (jekyll) with my own domain using SSL. – evan Jul 13 '16 at 20:11
  • I understand. The thing is, GitLab Pages is exclusive for GitLab EE (Enterprise Edition) customers, meaning, if you are trying to set it up with Gitlab CE (the free version), it won't work, unfortunately :( – Virtua Creative Jul 13 '16 at 20:14
  • But if you have a licence for GitLab EE, which is quite affordable, you can do it, yes :). You can also use GitLab.com, free for everyone... Is that the case? – Virtua Creative Jul 13 '16 at 20:15
  • @VirtuaCreative wait so it's not possible to have https through Gitlab on my custom domain for just a regular free account? - I need to do it through Cloudflare or something? I was hoping that was the perk over using GitHub pages. – evan Jul 13 '16 at 23:58
  • 1
    Nonono, sorry, my bad if I didn't explain clearly enough, that's not the idea. Of course you can have your website hosted by GitLab Pages for free. With your own domain name, https and all – Virtua Creative Jul 14 '16 at 00:00
  • What is not possible is setting up this for your own GitLab CE instance. So, you'll need a free account on GitLab.com – Virtua Creative Jul 14 '16 at 00:01
  • With Pages for GitLab EE is like having your own hosting service, allowed to host website for every user and project. So this is more for companies, not for individuals. Got it? – Virtua Creative Jul 14 '16 at 00:02
  • Check this post: https://about.gitlab.com/2016/04/07/gitlab-pages-setup/, it explains everything. But you'll need your free account on https://gitlab.com/users/sign_in – Virtua Creative Jul 14 '16 at 00:04
  • I have a [free account](https://gitlab.com/u/virtuacreative) on GitLab.com. Check this project: https://gitlab.com/virtuacreative/startssl/. It's the source for https://cloud.marcia.ml/ - with free hosting, free custom domain and free SSL. Everything is free :) – Virtua Creative Jul 14 '16 at 00:13
  • @VirtuaCreative alright got it, i have that at https://yodel.gitlab.io/yodel-website/ (for some reason it's not showing, maybe because of my Jekyll url configs) but it's pointing to http://yodel.co. However https isn't working there so I'm not sure where to begin. How did you get SSL on your free custom domain? I also started a question for this: http://stackoverflow.com/questions/38058694/gitlab-pages-custom-domain-ssl?noredirect=1#comment63565144_38058694 – evan Jul 14 '16 at 00:32
  • I'm replying in an answer okay? :) – Virtua Creative Jul 14 '16 at 00:38

2 Answers2

1

The GitLab omnibus installation has a different home directory for the user git. By default this directory is /var/opt/gitlab. You check check if the directory has changed either by checking the gitlab.rb config and search the key user['home'] or do a cat /etc/passwd | grep git and find the home directory there.

Fairy
  • 3,592
  • 2
  • 27
  • 36
1

\o/ Great! I got this certificate from StartSSL Class 1, check this tutorial to know how did I do this: https://about.gitlab.com/2016/06/24/secure-gitlab-pages-with-startssl/.

The free domain name I got from here: http://www.freenom.com/.

You can have them working together in a blink of your eyes! ;)

Also, you can use CloudFlare certs, the tricky part is explained here: https://gitlab.com/pages/pages.gitlab.io/issues/21

Hope it helps! Let me know if you need anything else.

You can always ask creating an issue here:https://gitlab.com/pages/pages.gitlab.io/issues/new - feel free to mention me directly if you want (@virtuacreative) :)

Virtua Creative
  • 2,025
  • 1
  • 13
  • 18
  • Hooray that was the trick! Can't believe I missed this article: https://about.gitlab.com/2016/06/24/secure-gitlab-pages-with-startssl/. very helpful. – evan Jul 14 '16 at 01:29
  • Awesome!! I'm so glad to have helped! :) – Virtua Creative Jul 14 '16 at 01:31
  • Is there something i'm missing to redirect http to https now? My site is still accessible at http. Maybe in `gitlab-ci.yml`? – evan Jul 14 '16 at 16:36
  • Or maybe my CNAME? it's accessible at both http and https. – evan Jul 14 '16 at 16:50
  • @evan it still be going to be available through http, you need to config it to redirect to https only. This is not made automatically by GitLab Pages server. I know 2 ways for that. One of them is [via meta tags](http://webmaster.iu.edu/tools-and-guides/maintenance/redirect-meta-refresh.phtml) Another way is via CloudFlare, you can config it to only accept https connections. It's free to use too :D – Virtua Creative Jul 14 '16 at 17:33
  • I don't think a CNAME works on this case, because the redirection is not between domains or subdomains, but protocols only. – Virtua Creative Jul 14 '16 at 17:34
  • For Jekyll, you can also setup the url in the `_config.yml` to `url: https://blablabla.com`. May be helpful. :) – Virtua Creative Jul 14 '16 at 17:37