Tears on the Great Wall, moved from GitHub to GitCafe

Tears on the Great Wall, moved from GitHub to GitCafe

GitHub

Blog Migration Guide

Recently I have found that it is becoming increasingly difficult to connect to the world, so I decided to migrate my blog from Github to Gitcafe, to facilitate access by people in China (although I don't do much work), and to make a backup in case the "world's largest gay dating site" goes down one day. The migration took some time, and it was not difficult. Here is a small summary.

Preparation

First of all, just like Github, you need a Gitcafe account (click here for the registration link). I won’t teach you how to use Hexo here, as everyone knows how to use it by default.

After you have an account, you need to create a project. In fact, it is the same as opening a personal blog on Github. Just create a project and make sure the project name is the same as the owner's name.

Project establishment

After creating it, remember to add the local SSH to Gitcafe. The specific method is:

Open Personal Settings -> Account Settings -> SSH Public Key Management -> Add

Then copy your local SSH public key to it. You asked me where the local public key is? Find it on your machine.

id_rsa.pub

The file is OK.

RSA Setup

Once the preparations are done, you can start the migration.

Migration work

Go to your blog directory

.delploy

In the directory, use the following command:

git config --global user.name 'your Gitcafe account'

git config --global user.email 'your Gitcafe email'

Then create a branch and switch to it.

git checkout -b gitcafe-pages

Submit your local code

git push -u origin gitcafe-pages

Then switch back to your master.

Access the domain name given to you by Gitcafe

yourusername.gitcafe.io

Has it been moved there already?

Aftermath

After that, every time you use hexo d -g to update and submit your blog, Github will still be updated. If you make minor updates to the content on Gitcafe, you need to switch back to the gitcafe-pages branch and submit the local code.
If you want to swap their status just change _config.yml:

deploy:

type: github

repository: [email protected]:yourname/yourname.git

branch: gitcafe-pages

Then update the content of your master in the same way, manually update.

If you think you need to enter so many commands for each submission, you can write a compound command alias and add it to the .bashrc file and then execute it in your blog directory.

alias upblog='cd .deploy/ && git checkout gitcafe-pages && git push -u origin gitcafe-pages && git checkout master && cd .. && hexo d'

Tail

The whole project is actually not difficult and can be solved with a little effort. However, the stability of Gitcafe does not seem to be as good as Github. Its strength lies in the fast access speed in China, with a ping value of about 40. As for why it is so troublesome, I looked at the Great Wall for a long time, unable to speak to myself.

<<:  Wearable devices may promote the integration of wireless technology

>>:  Some tips for iOS development

Recommend

From 0 to 1, how to build a ToB market operation system? (superior)

Disclaimer: This article is only based on persona...

How to achieve growth from 0 to 500,000 for an independently operated mini program?

It’s been a long time since I updated the article...

Night reading: 4 effective ways to get rid of "mental exhaustion"

Once when I was chatting with a friend, she said ...

Did the broken capital chain lead to the closure of technology media Gigaom?

The famous technology blog Gigaom suddenly announ...

Why does ofo invest in advertising while Mobike does public relations?

To date, ofo and Mobike have been fighting for ne...

New gameplay! What can iPhone 6s do with Force Touch?

Force Touch technology has been successfully appl...

Ocean Love Story Series丨Anglerfish——This Sticky Love

Author: Scientific Scraps Reviewer: Zhang Wei, As...

How to conduct refined data operation analysis?

The degree of refinement of efficient operations ...

Can live streaming really save the offline crisis?

Recently, due to the impact of the epidemic, most...

What would happen to our lives if the Earth changed its size?

Is the size of the Earth fixed? Can we change its...

After becoming emo, my brain has become smaller...

Audit expert: Yin Tielun Deputy Chief Physician, ...