• Home
    • English
    • 中文
  • About Us
  • Services
    • SEO Services
    • Website Design Service
  • Projects
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Contact Us

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot

Design a plugin for wordpress woocommerce to display a tab to show attachment download

2024-04-06

TranslatePress v2.6.9 – WordPress Translation Plugin

2023-12-25

A Linux batch script converting pictures to webp format

2023-07-10
Facebook Twitter Instagram
  • 中文
  • English
Facebook Twitter Instagram Pinterest VKontakte
Weilai Tech Weilai Tech
  • Home
    • English
    • 中文
  • About Us
  • Services
    • SEO Services
    • Website Design Service
  • Projects
  • Docs
  • Blog
    • Affiliate
    • Ecommerce
    • Frontend
    • linux
      • nginx
    • PHP
      • Magento
      • wordpress
    • Python
    • SEO
    • Web
  • Contact Us
Weilai Tech Weilai Tech
Home»Python»sh auto push static content to github -gogit
Python

sh auto push static content to github -gogit

OxfordBy Oxford2018-12-29No Comments1 Min Read
Facebook Twitter Pinterest LinkedIn Tumblr Email
Share
Facebook Twitter LinkedIn Pinterest Email
2016-03-28 发布

一个结合crontab定时推送github或coding库小玩意 

gogit

 2.5k 次阅读  ·  读完需要 4 分钟
0

 

gogit

一个结合crontab定时推送github或coding库小玩意。

Github:https://github.com/HavenShen/gogit

注:运行此玩意的电脑,必须可运行python、已经配置好github和coding使用ssh key 无密钥通道git的ssh获取方式(推荐使用常年不关机的linux服务器)。

配置参考:Git配置安装使用教程操作github上传克隆数据

安装

1.克隆此库

git clone [email protected]:HavenShen/gogit.git

配置推送github同时提交coding库

1.在自己的github和coding中创建自己的新库

可取名如:mygogit取得自己的ssh地址

  • [email protected]:xxx/mygogit.git
  • [email protected]:xxx/mygogit.git

2.修改及增加刚在github克隆的库目录下gogit/.git/config文件中的[remote "origin]"节点下url路径

url = [email protected]:xxx/mygogit.git
url = [email protected]:xxx/mygogit.git

设置crontab定时任务


#编辑定时任务

crontab -e

#键入每天下午3点执行命令

00 15 * * * python /home/gitfile/gogit/main.py #这边执行路径按自己的库目录而改动

#保存退出

:wq
  

搞定。

坐等任务每天帮你填补github空地,以及coding每天推送代码的 + 0.01码币

错误反馈

1.如果crontab不执行python脚本

在main.py文件头部加入

#!/usr/bin/python #对应python环境变量路径

把Python(main.py)的属性改为可执行

chmod a+x main.py

修改crontab

crontab -e
00 15 * * * /home/gitfile/gogit/main.py

License

Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
Avatar photo
Oxford

Related Posts

How To Scrape Amazon at Scale With Python Scrapy, And Never Get Banned

2022-01-08

linked-in get email info via python

2019-12-31

python login and craw email address

2019-12-18

How To Crawl A Web Page with Scrapy and Python 3

2018-11-29
Recent Posts
  • Design a plugin for wordpress woocommerce to display a tab to show attachment download
  • TranslatePress v2.6.9 – WordPress Translation Plugin
  • A Linux batch script converting pictures to webp format
  • Hearing aid listed company official website SEO case
  • how to use docker to run php5.6 plus apache
December 2018
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« Nov   Jan »
Tags
app branding design digital Docly docs etc faq fix github Helpdesk Image issue magento Manual marketing memecached Photography planing seo sequrity tips Travel ui/ux web WordPress 爬虫
Editors Picks
About Us

Guangzhou Weilai Technology is a foreign trade integrated marketing service provider focusing on Google as the drainage center and marketing self-built website as the carrier.

Email Us: [email protected]
Contact: +86 18676917505

Facebook Pinterest YouTube LinkedIn
Recent Posts
  • Design a plugin for wordpress woocommerce to display a tab to show attachment download
  • TranslatePress v2.6.9 – WordPress Translation Plugin
  • A Linux batch script converting pictures to webp format
  • Hearing aid listed company official website SEO case
  • how to use docker to run php5.6 plus apache
From Flickr
Website Design Case
© 2024 Copyright by Guangzhou Weilai Technology Co.,Ltd..
  • Home
  • About Us
  • SEO Services
  • Website Design Service
  • Projects
  • Blog
  • Contact Us

Type above and press Enter to search. Press Esc to cancel.