Обновить execute.py
This commit is contained in:
25
execute.py
25
execute.py
@@ -21,19 +21,28 @@ sample_string_bytes = sample_string.encode("utf-8")
|
|||||||
base64_bytes = base64.b64encode(sample_string_bytes)
|
base64_bytes = base64.b64encode(sample_string_bytes)
|
||||||
base64_string = 'AUTHORIZATION: basic ' + base64_bytes.decode("utf-8")
|
base64_string = 'AUTHORIZATION: basic ' + base64_bytes.decode("utf-8")
|
||||||
|
|
||||||
config = 'http.'+GITHUB_SERVER_URL+'/.extraheader="'+base64_string+'"'
|
key = 'http.'+GITHUB_SERVER_URL+'/.extraheader'
|
||||||
cmd = 'git config --global ' + config
|
value = '"'+base64_string+'"'
|
||||||
os.system(cmd)
|
cmd = 'git config --global ' + key + ' ' + value
|
||||||
config = 'url.'+GITHUB_SERVER_URL+'/.insteadOf="git'+'codex.r10x.net'+'"'
|
result = os.system(cmd)
|
||||||
cmd = 'git config --global ' + config
|
print('result:' , result)
|
||||||
os.system(cmd)
|
|
||||||
|
key = 'url.'+GITHUB_SERVER_URL+'/.insteadOf'
|
||||||
|
value = '"git@'+'codex.r10x.net'+'"'
|
||||||
|
cmd = 'git config --global ' + key + ' ' + value
|
||||||
|
result = os.system(cmd)
|
||||||
|
print('result:' , result)
|
||||||
|
|
||||||
cmd = 'git config list '
|
cmd = 'git config list '
|
||||||
os.system(cmd)
|
result = os.system(cmd)
|
||||||
|
print('result:' , result)
|
||||||
|
|
||||||
cmd = 'git clone ' + \
|
cmd = 'git clone ' + \
|
||||||
GITHUB_SERVER_URL + '/' + \
|
GITHUB_SERVER_URL + '/' + \
|
||||||
GITHUB_REPOSITORY
|
GITHUB_REPOSITORY
|
||||||
print('cmd:', cmd)
|
print('cmd:', cmd)
|
||||||
os.system(cmd)
|
result = os.system(cmd)
|
||||||
|
print('result:' , result)
|
||||||
|
|
||||||
print(f"Encoded string: {base64_string}")
|
print(f"Encoded string: {base64_string}")
|
||||||
print('#'*80)
|
print('#'*80)
|
||||||
|
|||||||
Reference in New Issue
Block a user