-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush.py
More file actions
executable file
·31 lines (20 loc) · 804 Bytes
/
push.py
File metadata and controls
executable file
·31 lines (20 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python3
#------------------------------------------------------
# get password
#------------------------------------------------------
import sys,os
from pathlib import Path
home = str(Path.home())
AutoPassDirc = home + '/Documents/AutoPassword'
sys.path.insert(0,AutoPassDirc)
import password as pw
username = pw.GetAutoPasswd('git2','username').get()
password = pw.GetAutoPasswd('git2','password').get()
project = pw.GetAutoPasswd('git2','project').get()
#------------------------------------------------------
import datetime,os
time = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
gitadd = "git add .;"
gitcom = "git commit -m "+"\""+time+"\";"
gitpus = "git push https://"+username+":"+password+"@"+project+" --force;"
os.system( gitadd + gitcom + gitpus )