最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Mac中恢复crifan的gitbook的template模板环境

Mac crifan 1394浏览 0评论
自己之前搭建好的环境:
crifan/gitbook_template: 演示如何使用crifan的gitbook的模板去创建自己的gitbook电子书
现在去另外一台Mac中恢复整套环境。
已经下载了代码,可以
make debug
了。但是想要继续实现
make deploy
不过发现需要去添加sshpass:
================================================================================
Upload for desktop_app_framework_electron
sshpass -f /Users/xxx/dev/crifan/gitbook/gitbook_template/common/config/deploy/deploy_server_password.txt rsync -avzh --progress --stats --delete --force /Users/xxx/dev/crifan/gitbook/gitbook_template/generated/books/desktop_app_framework_electron/release/desktop_app_framework_electron [email protected]:/data/wwwroot/book.crifan.com/books
make: sshpass: No such file or directory
make: *** [upload] Error 1
后记:同样问题:
然后去:
【已解决】Mac中再次尝试安装sshpass
继续试试
遇到其他错误:
【已解决】Mac中sshpass加上rsync运行报错:Host key verification failed rsync error unexplained error code 255 rsync.c sender
过了会就正常上传成功了:
。。。
desktop_app_framework_electron/website/support_python/
desktop_app_framework_electron/website/support_python/index.html
      62.72K 100%    4.27MB/s    0:00:00 (xfer#153, to-check=0/193)
total: matches=0  hash_hits=0  false_alarms=0 data=45195793


Number of files: 193
Number of files transferred: 153
Total file size: 45.20M bytes
Total transferred file size: 45.20M bytes
Literal data: 45.20M bytes
Matched data: 0 bytes
File list size: 5420
File list generation time: 0.011 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 39.36M
Total bytes received: 3.63K


sent 39.36M bytes  received 3.63K bytes  846.51K bytes/sec
total size is 45.20M  speedup is 1.15
继续:
期间发现提示有几个图片找不到
debug: Applying case-transforming CSS...
debug: Rasterizing SVG images...
debug: Converting XHTML to Mobipocket markup...
debug: Failed to find image: ../../assets/img/electron_python_example_code.png
debug: Failed to find image: ../../assets/img/electron_python_launch_ui.png
debug: Failed to find image: ../../assets/img/electron_python_zerorpc_working.png
debug: Failed to find image: ../../assets/img/electron_python_hello_caculator.png
debug: Failed to find image: ../../../assets/img/html_textarea_show_js_output.png
debug: Failed to find image: ../../../assets/img/electron_devtools_and_console_log.png
debug: Failed to find image: ../../../assets/img/electron_app_no_main_js_log.png
debug: Failed to find image: ../../../assets/img/electron_app_mitmdumpurlsaver.png
debug: Failed to find image: ../../../assets/img/electron_app_contents_bin.png
debug: Failed to find image: ../../../assets/img/terminal_see_main_js_log.png
debug: Failed to find image: ../../../assets/img/devtools_see_render_js_log.png
debug: Failed to find image: ../../../assets/img/see_log_after_toggle_devtools.png
debug: Serializing markup content...
debug:   Compressing markup content...
debug: Generating MOBI index for a book
debug: MOBI output written to /var/folders/gt/5868sbcd1jq4rxvryqhy2_1sz8n0s3/T/tmp-26273ZRYx6iNhK5RX/index.mobi
debug: Output saved to   /var/folders/gt/5868sbcd1jq4rxvryqhy2_1sz8n0s3/T/tmp-26273ZRYx6iNhK5RX/index.mobi
debug: calling hook "finish"
抽空需要去看看。
继续:
Commit for desktop_app_framework_electron
rsync -avzh --progress --stats --delete --force /Users/xxx/dev/crifan/gitbook/gitbook_template/generated/books/desktop_app_framework_electron/release/desktop_app_framework_electron /Users/crifan/dev/dev_root/github/github.io/crifan.github.io
building file list ...
193 files to consider
rsync: mkdir "/Users/crifan/dev/dev_root/github/github.io/crifan.github.io" failed: No such file or directory (2)
rsync error: error in file IO (code 11) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/main.c(545) [receiver=2.6.9]
rsync: connection unexpectedly closed (8 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/rsync/rsync-52.200.1/rsync/io.c(453) [sender=2.6.9]
make: *** [commit] Error 12
此处错误,是已知的,没有对应目录。
所以去新建对应目录
https://crifan.github.io
-》
-》
先去新建一个crifan.github.io
git clone https://github.com/crifan/crifan.github.io.git
下载,但是速度慢:
然后去:
【已解决】mac中给git加代理加速git clone下载代码的速度
然后去把对应本地crifan.github.io.git的路径
xxx@xxx  ~/dev/crifan/crifan.github.io   master  pwd
/Users/xxx/dev/crifan/crifan.github.io
更新到之前Makefile中:
/Users/xxx/dev/crifan/gitbook/gitbook_template/common/gitbook_makefile.mk
# if need commit, change these to yours
# GITHUB_IO_PATH=/Users/crifan/dev/dev_root/github/github.io/crifan.github.io
GITHUB_IO_PATH=/Users/xxx/dev/crifan/crifan.github.io
然后再去试试
make deploy
可以继续了:
期间
Untracked files:
  (use "git add <file>..." to include in what will be committed)


        desktop_app_framework_electron/
说明的确开始尝试去push了。
create mode 100644 desktop_app_framework_electron/website/support_python/index.html
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)


nothing to commit, working tree clean
Enumerating objects: 143, done.
Counting objects: 100% (143/143), done.
Delta compression using up to 8 threads
Compressing objects: 100% (138/138), done.
Writing objects: 100% (142/142), 36.60 MiB | 23.64 MiB/s, done.
Total 142 (delta 40), reused 0 (delta 0)
等待了一会后,就完成了
remote: Resolving deltas: 100% (40/40), completed with 1 local object.
To https://github.com/crifan/crifan.github.io.git
   604b6d1..f629463  master -> master
/Users/xxx/dev/crifan/gitbook/gitbook_template/books/desktop_app_framework_electron
================================================================================
Deploy for desktop_app_framework_electron
xxx@xxx  ~/dev/crifan/gitbook/gitbook_template/books/desktop_app_framework_electron   master 
至此,终于完整恢复了gitbook的template的环境。
后续其他gitbook写好后,就可以用
make deploy
愉快的发布了。

转载请注明:在路上 » 【已解决】Mac中恢复crifan的gitbook的template模板环境

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
82 queries in 0.182 seconds, using 22.15MB memory