I think the title describes my problem well: I want to schedule git push
. To be more specific, I'd like to know how I can either
我认为标题很好地描述了我的问题:我想安排git push。更具体地说,我想知道我怎么做
- tell
git
to make push at a specified time - tell OS to execute
git push
at a specified time without re-authentication (preferably, in such a way that the other attempts topush
shall require authentication.).
告诉git在指定时间进行推送
告诉操作系统在指定的时间执行git push而不重新认证(最好是其他尝试推送的方式需要认证)。
I'm on linux (Ubuntu 13.04) and thus scripting with bash will be fine.
我在linux上(Ubuntu 13.04)因此使用bash编写脚本会很好。
2 个解决方案
#1
3
There is nothing in git which includes:
git中没有任何内容包括:
- scheduling (this is provided by Ubuntu with cron jobs)
- authentication: it depends on the kind of listener (https, ssh, git, ...) you have on the remote side.
调度(这是由Ubuntu提供的cron作业)
身份验证:它取决于您在远程端的侦听器类型(https,ssh,git,...)。
Depending on your remote url, you can, for instance:
根据您的远程URL,您可以,例如:
- use a dedicate public/private ssh key.
- use encrypted credentials (username/password) with https url (as in "Configure Git clients, like GitHub for Windows, to not ask for authentication")
使用专用的公共/私人ssh密钥。
使用加密凭证(用户名/密码)和https url(如“配置Git客户端,如GitHub for Windows,不要求身份验证”)
#2
0
you can schedule such jobs using cron
.
你可以使用cron安排这样的工作。
00 07 * * * git push
will run git push
command everyday at 7 AM.
将在每天上午7点运行git push命令。
#1
3
There is nothing in git which includes:
git中没有任何内容包括:
- scheduling (this is provided by Ubuntu with cron jobs)
- authentication: it depends on the kind of listener (https, ssh, git, ...) you have on the remote side.
调度(这是由Ubuntu提供的cron作业)
身份验证:它取决于您在远程端的侦听器类型(https,ssh,git,...)。
Depending on your remote url, you can, for instance:
根据您的远程URL,您可以,例如:
- use a dedicate public/private ssh key.
- use encrypted credentials (username/password) with https url (as in "Configure Git clients, like GitHub for Windows, to not ask for authentication")
使用专用的公共/私人ssh密钥。
使用加密凭证(用户名/密码)和https url(如“配置Git客户端,如GitHub for Windows,不要求身份验证”)
#2
0
you can schedule such jobs using cron
.
你可以使用cron安排这样的工作。
00 07 * * * git push
will run git push
command everyday at 7 AM.
将在每天上午7点运行git push命令。