Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install hexo blog in a remote repo to local machine? #2914

Closed
aaayumi opened this issue Dec 16, 2017 · 10 comments
Closed

How to install hexo blog in a remote repo to local machine? #2914

aaayumi opened this issue Dec 16, 2017 · 10 comments
Labels

Comments

@aaayumi
Copy link

aaayumi commented Dec 16, 2017

Hi! I'm using hexo in github page. Mistakingly I deleted my local file in my local machine. I tried to make a new local file again by using git clonehttps://github.com/aaayumi/aaayumi.github.io.git. then I installed npm install hexo-cli -g .

I could install all necessary files but when I typed hexo deploy,
it shows,

hexo deploy
Usage: hexo <command>

Commands:
  help     Get help on a command.
  init     Create a new Hexo folder.
  version  Display version information.

Global Options:
  --config  Specify config file instead of using _config.yml
  --cwd     Specify the CWD
  --debug   Display all verbose messages in the terminal
  --draft   Display draft posts
  --safe    Disable all plugins and scripts
  --silent  Hide output on console

For more help, you can use 'hexo help [command]' for the detailed information
or you can check the docs: http://hexo.io/docs/

Is there an way to be able to use hexo blog locally?

@ramonsantos
Copy link
Member

Hello, @aaayumi !

Probably, the repository https://github.com/aaayumi/aaayumi.github.io contains the files of your generated site, not the source files that Hexo needs to build your site.

To be sure, type the command ls (Linux or Mac OS) or dir (Windows) and post the result here.

@aaayumi
Copy link
Author

aaayumi commented Dec 17, 2017

Hello @ramonsantos! Thank you so much for your quick reaction.
I got the following result

2017 archives css img search.xml CNAME atom.xml images index.html sitemap.xml

As I just cloned my project from my github repository, I guess I don't have the source files that you mentioned... How can I include it to my new file in my local environment?

Thank you for your help..!!

@NoahDragon
Copy link
Member

@aaayumi if you lost the source files which created by hexo init, the easiest way to rebuild the website is:

  1. hexo init an empty folder
  2. Install hexo-migrator-rss plugin
  3. hexo migrate rss http://ayumi-saito.com/atom.xml

This will recover the posts, however, other customization on theme or Hexo will be lost.

@aaayumi
Copy link
Author

aaayumi commented Dec 24, 2017

Thank you for the reply.
I tried to hexo init but now I received the following message.

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ayumi/.npm/_logs/2017-12-24T12_56_31_309Z-debug.log

Now it seems that I cannot use hexo command.

@ramonsantos
Copy link
Member

@aaayumi, try run:

sudo hexo init

@aaayumi
Copy link
Author

aaayumi commented Dec 24, 2017

I received sudo: hexo: command not found in the terminal.

@JLHwung
Copy link
Collaborator

JLHwung commented Dec 25, 2017

@aaayumi For permission issues, please see #2785 (comment).

@ramonsantos
Copy link
Member

Please, run:

hexo -v

and post the result here.

@aaayumi
Copy link
Author

aaayumi commented Dec 27, 2017

After trying @JLHwung 's advice, I got the following result by running hexo -v

hexo-cli: 1.0.4
os: Darwin 17.2.0 darwin x64
http_parser: 2.7.0
node: 8.9.2
v8: 6.1.534.48
uv: 1.15.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.25.0
openssl: 1.0.2m
icu: 59.1
unicode: 9.0
cldr: 31.0.1
tz: 2017b

@stale
Copy link

stale bot commented Feb 25, 2018

This issue has been automatically marked as stale because lack of recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 25, 2018
@stale stale bot closed this as completed Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants