First of all, I have created a warehouse on GitHub, and then I used git init to initialize the local git warehouse, and then used to add a remote address to the current warehouse, because I need to install a dependency called hexo-deployer-git. I encountered an error when installing this library!
(I used yarn add hexo-deployer-git to install.) The screenshot is as follows:
1. Before solving this problem, I first searched the hexo-deployer-git library, which will help us deploy the generated code to a specific branch.
2. Solution :
I will try to use Taobao mirror (if not download Taobao mirror, first run npm install -g cnpm --registry=https://registry.npm.taobao.org to download Taobao mirror): cnpm install hexo-
I installed deployer-git --save , but it still reported an error as shown in the figure. I searched on Baidu for a long time and still couldn't find it. When I didn't want to do it, I ran the cnpm install hexo-deployer-git --save command again Now,
if there are friends who can't download the hexo-deployer-git plugin like me, you can try my above method! ! !
In addition, I also encountered a bug casually mentioned, that is, when I am preparing to submit the code to the git repository,
the type of deploy in config.yml should be git, and the address in the repo should be http instead of https.
https://www.cnblogs.com/imsoft/p/5228560.html There are other bugs and solutions encountered when hexo creates a warehouse on GitHub.