how to enable certbot wildcard on centos 7

certbbot definitely is a great FREE service. 

There are 2 options to install the wildcard, one with Docker and one manual install. Of course we’ll use manual install as the Docker install will create the certificates inside the Docker image and it will be very difficult for us to use.

1. First, Let’s get the certbot-auto

wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto

certbot-auto accepts the same flags as certbot; it installs all of its own dependencies and updates the client code automatically.

2. Then the command to use the manual plugin will look something like this:

./certbot-auto certonly --manual -d *.charliexiong.com -d charliexiong.com --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory

I saved this to a file like certbot-charliexiong.com-run

chmod a+x certbot-charliexiong.com-run

3. run the command

./certbot-charliexiong.com-run

It will try to install the needed packages

Then it will ask for needed information

After all these, you’ll need to create a TXT record with the name and value provided from the output.

Wait for a few minutes for the TXT record to be live, then enter.

That’s it, the wildcard certificates are available under /etc/letsencrypt folder

how to fix gitlab ce migration empty repository error

Recently I needed to migrate the gitlab from one server to another one,  followed the step to install gitlab community edition on my new server. I used Omnibus, it is much easier to maintain on the centos.

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash

after installed and reconfigured the gitlab, I tried to restore the back file and configuration folder.

Then I use git pull to test the repository, everything seems good

However after I restarted the gitlab again, suddenly the repository is gone

on my terminal is showing this error

“GitLab: A repository for this project does not exist yet. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.”

on the browser it is showing this

I googled for a while and found no clue, most of the threads are talking about gitlab.com missing repository, but not self installed.

Finally I found one thread mentioning about default git_data_dirs , then I checked the /etc/gitlab/gitlab.rb, and found that the it is pointing to a different folder

#git_data_dirs({ “default” => { “path” => “/var/opt/gitlab/git-data” } })

git_data_dirs({ “default” => { “path” => “/data/gitroot” } })

Not sure when it got changed,  the /data/gitroot folder does exist even though I didn’t manually created them and found some of the repositories there, but not all the repositories.

The  /var/opt/gitlab/git-data has all my repositories, so I just changed back the default git_data_dirs.

Everything works like charm now.