note-md icon indicating copy to clipboard operation
note-md copied to clipboard

auto backup failed!

Open wxiubin opened this issue 9 years ago • 5 comments

SanyuczdeMacBook-Pro:NoteMdit sanyucz$ npm start

> [email protected] start /Users/sanyucz/NoteMdit
> node index.js

server is listening on 3000
================================================================================
cmd: git add .
stdout:
stderr:
================================================================================
cmd: git commit -a -m "auto backup"
stdout: On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean

stderr:
exec error: Error: Command failed: git commit -a -m "auto backup"

auto backup failed!

按照你文档所说,更改note备份地址,添加ssh私钥之后,运行提示该信息。

wxiubin avatar Jan 06 '17 14:01 wxiubin

我fork了你的代码,只修改了note备份的Git地址。

wxiubin avatar Jan 06 '17 14:01 wxiubin

@sanyucz 这只是提示而已,没有修改提交就会失败

hanxi avatar Jan 07 '17 03:01 hanxi

可是,即便我修改了 git.js 文件中的 gitUrl

const path = require('path');
const fs = require('fs');
const exec = require('child_process').exec;

const gitUrl = '[email protected]:sanyucz/note-source.git';
const noteDir = path.join(process.cwd(), 'note');

最后只是会Git提交我这整个工程到我的工程远程仓库,而不是把note文件夹下的文件提交推送到 [email protected]:sanyucz/note-source.git 这里

wxiubin avatar Jan 12 '17 05:01 wxiubin

另外,能否询问下如果我想把工程放到远程服务器上面,让程序一直跑着,做些展示或者经常浏览。如何让ssh关掉之后node还在运行?

另外,如果文件名是中文的话,会有概率404. 我觉得标题不是文件名,最好是在笔记里面加字段设置标题~

谢谢~

wxiubin avatar Jan 12 '17 05:01 wxiubin

@sanyucz 可能是把提交路径搞错了,现在我在大改一版,路径的问题我过段时间再来检查下。

后台运行你需要用到 nohup 这东西。

中文标题我想到了,还没找到合适的方案,打算采用第一行的 # 作为标题的。

hanxi avatar Jan 12 '17 07:01 hanxi