npm error code ECONNRESET npm error syscall read npm error errno ECONNRESET npm error network request to https://registry.npmjs.org/express failed, reason: read ECONNRESET npm error network This is a problem related to network connectivity. npm error network In most cases you are behind a proxy or have bad network settings. npm error network npm error network If you are behind a proxy, please make sure that the npm error network 'proxy' config is set properly. See: 'npm help config' npm error A complete log of this run can be found in: E:\nodejs\node_cache\_logs\2024-10-31T17_24_20_852Z-debug-0.log
The authenticity of host 'github.com (20.205.243.166)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Could not create directory '/c/Users/\301\364\260\327/.ssh' (No such file or directory). Failed to add the host to the list of known hosts (/c/Users/\301\364\260\327/.ssh/known_hosts). git@github.com: Permission denied (publickey).
Host github.com HostName github.com User git IdentityFile E:/ssh/id_rsa UserKnownHostsFile E:/ssh/known_hosts
3.git bash输入
1 2
eval "$(ssh-agent -s)" ssh-add E:/.ssh/id_rsa
完成以上尝试,我再次输入ssh -T git@github.com,出现
1 2 3 4 5 6 7
The authenticity of host 'github.com (20.205.243.166)' can't be established. ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Could not create directory '/c/Users/\301\364\260\327/.ssh' (No such file or directory). Failed to add the host to the list of known hosts (/c/Users/\301\364\260\327/.ssh/known_hosts). Hi liubaiqing! You've successfully authenticated, but GitHub does not provide shell access.
看起来好像还是有些小问题,不过最后一句话已经success了,接下来尝试本地部署
四.本地部署
先找一个盘创建文件夹,用来存放blog的相关文件
在这个文件夹里空白处右键打开git bash
输入hexo init,返回
1 2 3
INFO Cloning hexo-starter https://github.com/hexojs/hexo-starter.git INFO Install dependencies INFO Start blogging with Hexo!
Commands: clean Remove generated files and cache. config Get or set configurations. deploy Deploy your website. generate Generate static files. help Get help on a command. init Create a new Hexo folder. list List the information of the site migrate Migrate your site from other system to Hexo. new Create a new post. publish Moves a draft post from _drafts to _posts folder. render Render files with renderer plugins. server Start the server. 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: https://hexo.io/docs/
输入hexo g,返回
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
INFO Validating config INFO Start processing INFO Files loaded in 276 ms INFO Generated: index.html INFO Generated: js/jquery-3.6.4.min.js INFO Generated: archives/index.html INFO Generated: css/style.css INFO Generated: archives/2024/11/index.html INFO Generated: archives/2024/index.html INFO Generated: fancybox/jquery.fancybox.min.js INFO Generated: css/images/banner.jpg INFO Generated: js/script.js INFO Generated: fancybox/jquery.fancybox.min.css INFO Generated: 2024/11/01/hello-world/index.html INFO 11 files generated in 254 ms
输入hexo s,返回
1 2 3
INFO Validating config INFO Start processing INFO Hexo is running at http://localhost:4000/ . Press Ctrl+C to stop.
INFO Validating config INFO Deploying: git INFO Clearing .deploy_git folder... INFO Copying files from public folder... INFO Copying files from extend dirs... warning: in the working copy of '2024/11/01/hello-world/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/2024/11/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/2024/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'css/style.css', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'fancybox/jquery.fancybox.min.js', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'js/jquery-3.6.4.min.js', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'js/script.js', LF will be replaced by CRLF the next time Git touches it Author identity unknown
to set your account's default identity. Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got '留白@LAPTOP-QJ1JI6GM.(none)') error: src refspec HEAD does not match any error: failed to push some refs to 'https://github.com/liubaiqing/liubai.github.io.git' FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html Error: Spawn failed at ChildProcess.<anonymous> (E:\my box\my blog\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21) at ChildProcess.emit (node:events:518:28) at cp.emit (E:\my box\my blog\node_modules\cross-spawn\lib\enoent.js:34:29) at ChildProcess._handle.onexit (node:internal/child_process:293:12)
INFO Validating config INFO Deploying: git INFO Clearing .deploy_git folder... INFO Copying files from public folder... INFO Copying files from extend dirs... warning: in the working copy of '2024/11/01/hello-world/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/2024/11/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/2024/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'css/style.css', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'fancybox/jquery.fancybox.min.js', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'js/jquery-3.6.4.min.js', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'js/script.js', LF will be replaced by CRLF the next time Git touches it On branch master nothing to commit, working tree clean fatal: unable to access 'https://github.com/liubaiqing/liubai.github.io.git/': Failed to connect to github.com port 443 after 21179 ms: Could not connect to server FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html Error: Spawn failed at ChildProcess.<anonymous> (E:\my box\my blog\node_modules\hexo-deployer-git\node_modules\hexo-util\lib\spawn.js:51:21) at ChildProcess.emit (node:events:518:28) at cp.emit (E:\my box\my blog\node_modules\cross-spawn\lib\enoent.js:34:29) at ChildProcess._handle.onexit (node:internal/child_process:293:12)
INFO Validating config INFO Deploying: git INFO Clearing .deploy_git folder... INFO Copying files from public folder... INFO Copying files from extend dirs... warning: in the working copy of '2024/11/01/hello-world/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/2024/11/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/2024/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'archives/index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'css/style.css', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'fancybox/jquery.fancybox.min.js', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'index.html', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'js/jquery-3.6.4.min.js', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'js/script.js', LF will be replaced by CRLF the next time Git touches it On branch master nothing to commit, working tree clean info: please complete authentication in your browser... Enumerating objects: 24, done. Counting objects: 100% (24/24), done. Delta compression using up to 24 threads Compressing objects: 100% (18/18), done. Writing objects: 100% (24/24), 278.64 KiB | 17.41 MiB/s, done. Total 24 (delta 3), reused 0 (delta 0), pack-reused 0 (from 0) remote: Resolving deltas: 100% (3/3), done. To https://github.com/liubaiqing/liubai.github.io.git + 676aa38...c1a17b6 HEAD -> main (forced update) branch 'master' set up to track 'https://github.com/liubaiqing/liubai.github.io.git/main'. INFO Deploy done: git