SSH 相关问题
- ssh: Could not resolve hostname + cron job
需要自动化执行 cron job,脚本主要功能就是 git push 到远程仓库。
解决方法:
在脚本中添加:
1 #!/bin/bash
2
3 ## Git
4 eval "$(ssh-agent -s)"
5 ssh-add ~/.ssh/ssh_key1
6 ssh-add ~/.ssh/ssh_key2
7 ssh-add -l
8
9 ## Job
10 cd ~/repo/blog/
11 make publish
12 cd ~/repo/gtd/
13 make publish