Resolves an issue where Gitlab's Gravatar avatar cannot be displayed

Source: Internet
Author: User


Catalogue [-]

Normal version Gitlab:

Version Omnibus Gitlab

Background: Gravatar Service has not been accessible recently, many services have been suffered, although not affected by the use but very unsightly.


Recently I was trying to Omnibus Gitlab, ready to see if it can be solved, found that the combination of common online Duoshuo CDN Way is still relatively easy, recorded as follows:


Normal version Gitlab:


To edit Gitlab.yml, find the following section:


# # Gravatar

Gravatar

Enabled:true # Use user avatar image from gravatar.com (default:true)

# Gravatar urls:possible placeholders:%{hash}%{size}%{email}

# Plain_url: "http//..." # Default:http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon

# Ssl_url: "https://..." # Default:https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon

Remove the Plain_url annotation and write the following:


Plain_url: "Http://gravatar.duoshuo.com/avatar/%{hash}?s=%{size}&d=identicon"

Restart Service


If the Gitlab is not newly built, there will still be some avatar addresses pointing to the original address and the following command to correct the cached data (thanks to the objdump supplement):


Rake Cache:clear rails_env=production

Version Omnibus Gitlab


To edit the/ETC/GITLAB/GITLAB.RB, add the following line:


gitlab_rails[' gravatar_plain_url '] = ' Http://gravatar.duoshuo.com/avatar/%{hash}?s=%{size}&d=identicon '

Executing at the command line


sudo gitlab-ctl reconfigure

sudo gitlab-rake cache:clear rails_env=production


Resolves an issue where Gitlab's Gravatar avatar cannot be displayed

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.