Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Custom GitLab login page

Tags:

gitlab

I'm looking to do some minimal GitLab CE customization by using my own image assets: brand_logo.png, favicon.ico, logo-black.png, logo-white.png I ran into:

https://kovah.me/customize-gitlab-installation/

http://axilleas.me/en/blog/2014/custom-gitlab-login-page/

I want to avoid the approach in the former as I'd prefer not to mess with any files other than the image fails. I tried the approach on the latter, but couldn't get it to work with my omnibus install (Ubuntu 12.04). I get a flurry of errors when trying to recomplie assets. Any tips?

like image 575
ttosttos Avatar asked Oct 22 '14 22:10

ttosttos


2 Answers

Currently, gitlab-ce allows to modify the text and logos on the page see branded login for more info.

When editing, there was a discussion about allowing to change the favicon.

If you need to make more aggressive modifications, see below.

Old answer:

If you don't have any plans on upgrade the gitlab (or you don't mind on repeating this process everytime you upgrade) try the following:

Modify the desired assets, the path is: /opt/gitlab/embedded/service/gitlab-rails/app/assets/images/

after it, clean the assets cache:

gitlab-rake assets:clean RAILS_ENV=production

and generate them (I had some permissions errors with this one, nothing that a chmod 777 couldn't fix, just try to revert them back to its original state)

gitlab-rake assets:precompile RAILS_ENV=production

and finally a restart

sudo gitlab-ctl restart

like image 145
Josejulio Avatar answered Oct 22 '22 16:10

Josejulio


the second link is mine :) I was gonna write a post about custom login in omnibus but if you really want to do this the right way, you'd have to build your own omnibus package. Basically, it sums up to this:

  1. Follow my post to make any custom changes and push to a branch in github or your gitlab repo.
  2. Clone omnibus-gitlab, edit config/software/gitlab-rails.rb to reflect your custom login commit and git repo from step 1 and follow the instructions to build the package.

You can see the what I changed here.

like image 28
axil Avatar answered Oct 22 '22 16:10

axil