I have changed the domain on my gitlab installation from ABC to XYZ according to the procedure explained here:
How to change URL of a working GitLab install?
The problem is, that old uploaded assets (images that were added to issues in projects), still point to the old ABC domain:
https://ABC/uploads/...
The Site is using SSL. The old ABC SSL certificate is no longer valid. Hence, those assets generate "net::ERR_INSECURE_RESPONSE" in the browser and are not shown.
Is there a way to update those assets to use the new domain name? I have tried:
bundle exec rake assets:precompile RAILS_ENV=production
to no avail.
Newly uploaded images on the new domain show correctly.
Gitlab: how to change domain on the old uploaded assets?
For what I could understand, older versions of Gitlab store the absolute path of the attached files in the issue description. So even if you reconfigure Gitlab, the URLs in the issue descriptions will still be pointing to the old domain.
After you reconfigure your Gitlab with the new domain you could:
1: edit the posts manually
If you don't have a lot of embeded files you can just edit every issue and save. Any edit will trigger the link update.
2: edit the database
sudo -u gitlab-psql /opt/gitlab/embedded/bin/psql -h /var/opt/gitlab/postgresql/ gitlabhq_production
update issues set description_html = replace(description_html, 'old.domain', 'new.domain');
3: update Gitlab then clear the cache
Newer versions of Gitlab store a relative path to the uploaded files instead of the absolute one
apt-get install gitlab
sudo gitlab-rake cache:clear
sudo gitlab-ctl reconfigure
References
https://gitlab.com/gitlab-org/gitlab-ce/issues/32789
https://gitlab.com/gitlab-org/gitlab-ce/issues/2476
How to change URL of a working GitLab install?
direct access to to gitlab database
Related
I took the RHCSA certification exam and Question 2 required me to create a local repo. I executed the command "yum config-manager --add-repo / path / to / AppStream", but when I executed the commands "yum clean all" and "yum install httpd", I was required to "subscription manager regisrty". I informed the supervisor about this. But he said that I was wrong. I told them that they had to solve it. And I did not move on to the next task in the exam. It took me a lot of time.
I wrote to the person who sent the exam results. they also just send me exam results. Where can I apply for this?
You cannot use that command in RHCSA exam.You have to add repo manually.
You need to create a repo in /etc/yum.repos.d/, These are the steps to create a local repo.
vim /etc/yum.repos.d/ #create a new file here.
#yum config looks in this folder when searching for repositories
#configure file as seen below with the given repo urls and name.
[AppStream] #this is just a tag name
name=AppStream #name of repo
baseurl=https://whatever.xyz.redhat.com/AppStream #url of repo you are given
gpgcheck=0 #this tells yum to not check gpgkeys for repo
enable=1 #this enables the local repo
yum clean all
This should work to have yum recognize the repos you want to connect to and install from. you may need to also log into the repo using
subscription-manager register #hit enter to add username and password.
Hopes this helps.
So I configured My FREE Amazon EC2 (Linux) server with PHP and MySQL using SSH. Then Installed WordPress and set it up accordingly. Which went smoothly and could access perfectly through my "IP/directoryname". After that I had a lot of issues with writing directories and Transferring files. Which I took care of using these commands,
sudo chown -R apache:apache /var/www/html
sudo chown -R ec2-user:ec2-user /var/www/html
sudo chmod -R 755 /var/www/html
Increased the PHP Upload limit using SSH to 256M. And when my test site was running perfectly, I decided to install a Prebuilt site of mine using the Duplicator Plugin which has an installer.php file with the "Old Site Files and Database" a package. It requires an empty directory. So I deleted all my files using FTP from my test site Directory and uploaded the Duplicator Package and Installer. Installed the site and put my EC2 mysql info accordingly. I selected to overwrite my old Database and delete all existing tables. Which installed successfully (At least the installer said that!). But I can't seem to access my site anymore. Now my site says, "This page isn't working". I don't know what to do here. Can you guys spare me a little bit of your time. Any info you need , just ask. Could this be a WordPress Permalink issue? I don't know how to update the Permalink table using SSH. Maybe I've deleted an important Directory file when I deleted the Old Directory files?
Your Friendly Neighborhood Sidekick,
Ratul
Okay, so I just installed GitLab using the Omnibus edition on Ubuntu 14.04. I've got everything working, EXCEPT e-mail links and project URLs are using internal links (http://gitlab/). I've configured the external url parameter in /etc/gitlab/gitlab.rb, and I can't find any other settings to configure to possibly change this.
after you change de external url you must reconfigure gitlab with gitlab-ctl reconfigure
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?
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
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:
Follow my post to make any custom changes and push to a branch in github or your gitlab repo.
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.
I've been through the extensive gitolite documentation over and over again. This is my configuration :
Git user running gitolite, while I installed Gitolite as another user, which had root privileges. I installed using the gl-system-install method.
Now, I see two copies of hooks/common directory /usr/local/share/gitolite/hooks/common and /home/git/.gitolite/ (and I intend to work with the first one for system wide implementation)
The gitolite-source is located at /home/user/gitolite-source
I've put in some dummy hooks in the /home/user/gitolite-source/hooks/common/ directory (post-udpate, post-update.secondary, post-receive and post-commit). All of these have exec bit set.
If I edit the update hook in this directory and re-run the setup again, the newer update hook (in existing repos) is sym-linked to the update hook in /usr/local/share/gitolite/hooks/common.
But even though any newer hooks in the source/hooks/common directory are copied over to both the hook locations, newer sym-links do not appear in my existing repos.
In short : gitolite copies its own hooks, but neglects mine.
Any idea why?
I figured out the answer on my own.
I was re-running the gl-system-setup over and over again in hopes of making those sym links created for me under each repository, while it was the gl-setup that did it.
But re-running gl-setup did not work either. (It gave strange parse errors). So I decided to just remove all the gitolite-hooked sentinel files, and push an update to the gitolite-admin repo, which copies hooks over if it does not find the gitolite-hooked file.