管理系统

个人hexo博客部署到Coding.net

2017-09-19  本文已影响324人  焰火青春

此文旨在解决hexo个人博客部署到github访问慢的问题

解决办法:

部署步骤

新建项目

仓库名字必须与Coding.net账户名字一致

仓库名 添加公钥

ssh -T git@git.coding.NET

绑定成功会出现以下代码:

C:\Users\hasee-pc\Documents\GitHub> ssh -T git@git.coding.NET
Warning: Permanently added 'git.coding.net,14.215.101.70' (RSA) to the list of known hosts.
Coding.net Tips : [Hello! You've connected to Coding.net via SSH. This is a deploy key.]

deploy:
  type: git
  repo:
        github: git@github.com:linshuhe1/linshuhe1.github.io.git,master
        coding: git@git.coding.net:codingfengj/codingfengj.git,master  

在source目录下新建一个文件,命名为Statifile,不带文件后缀。

cd source 
hexo init  Statifile

也可以直接新建

E:
cd  **.github.io    #这是我的仓库根目录

输入以下命令:

hexo clean
hexo generate    #生成静态网页    
hexo deploy       #开始部署

提交成功的话命令行提示:

On branch master
nothing to commit, working directory clean
Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.
Branch master set up to track remote branch master from git@github.com:linshuhe1/linshuhe1.github.io.git.
Everything up-to-date
On branch master
nothing to commit, working directory clean
Warning: Permanently added 'git.coding.net,180.97.181.69' (RSA) to the list of known hosts.
Branch master set up to track remote branch master from git@git.coding.net:linshuhe1/linshuhe1.git.
To git@git.coding.net:linshuhe1/linshuhe1.git
* [new branch]      HEAD -> master
INFO  Deploy done: git  
master分支
设置完毕后即可打开你的Coding地址访问博客了。
上一篇下一篇

猜你喜欢

热点阅读