Обновить 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_string = 'AUTHORIZATION: basic ' + base64_bytes.decode("utf-8")
|
||||
|
||||
config = 'http.'+GITHUB_SERVER_URL+'/.extraheader="'+base64_string+'"'
|
||||
cmd = 'git config --global ' + config
|
||||
os.system(cmd)
|
||||
config = 'url.'+GITHUB_SERVER_URL+'/.insteadOf="git'+'codex.r10x.net'+'"'
|
||||
cmd = 'git config --global ' + config
|
||||
os.system(cmd)
|
||||
key = 'http.'+GITHUB_SERVER_URL+'/.extraheader'
|
||||
value = '"'+base64_string+'"'
|
||||
cmd = 'git config --global ' + key + ' ' + value
|
||||
result = os.system(cmd)
|
||||
print('result:' , result)
|
||||
|
||||
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 '
|
||||
os.system(cmd)
|
||||
result = os.system(cmd)
|
||||
print('result:' , result)
|
||||
|
||||
cmd = 'git clone ' + \
|
||||
GITHUB_SERVER_URL + '/' + \
|
||||
GITHUB_REPOSITORY
|
||||
print('cmd:', cmd)
|
||||
os.system(cmd)
|
||||
result = os.system(cmd)
|
||||
print('result:' , result)
|
||||
|
||||
print(f"Encoded string: {base64_string}")
|
||||
print('#'*80)
|
||||
|
||||
Reference in New Issue
Block a user